AutoCAD Visual LISP / AutoLISP :: Bind JPG In Same DWG File?

Sep 24, 2012

Now i attached more logos in the drawing file. The logos all in JPG files.This all jpg files in different locations. Every time i sent file to email attach with all jpg files. Some time i forget the attach files. So i need 'how bind all jpg files in the drawing file'. Now i am working with AutoCAD 2013.

View 3 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Code Removes Prefixes Bind

Dec 4, 2012

The code removes prefixes bind ($ 0 $), renaming layers, blocks, dimension styles, but some objects do not change the name as linetypes, text styles and duplicate names.If I have an existing name, I want to change the name with a (2) at the end.Example.

Layer: FloorLevel$0$Door90
If the layer "Door90" is existing, is renamed to "Door90 (2)"
(defun c:delprefixe(/ ActDoc Name NewName)(vl-load-com)(defun RemoveBindPrefix (String / Pos LastPos)(if (setq Pos (vl-string-search "$" String))(progn(setq LastPos Pos)(while (setq Pos (vl-string-search "$" String (1+ Pos)))(setq LastPos Pos))(substr String (+ 2 LastPos)))String));
[code]....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Bind Xref Via ObjectDBX Without Opening

Feb 11, 2013

is it possible to bind an an xref via ObjectDBX without opening the drawing?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select And Bind All Xrefs In Model Space

Oct 9, 2012

Any code that will select all xrefs in modelspace and bind (insert) them?

the   -xref  bind command requires explicit names and if I use * it will also bind my titleblock xref in paperspace which I want to avoid.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Each Sheet In Excel File To TXT File

Dec 4, 2012

I am trying to export each sheet in an Excel file to an separateTXT files.

I currently have code to read each cell in a sheet, but unfortunately some of the Excel sheets have in excess of 5000 cells and it is taking too long to read. So I am switching to another method.

The program will check dates of TXT files and XLS file to make sure TXT files are current (if not, open and recreate TXT files).Then read the TXT files (much faster).

Where I am getting stuck is 2 places -

Get the names of each sheet in the excel file (not always a known name)

Save each sheet as separate TXT file.

Here is condensed code so far without error checking, etc -

(defun E2TXT (FileName /)
(if (and (setq XLfile (findfile FileName)) (vl-file-systime XLfile) (setq XLapp (vlax-get-or-create-object "Excel.Application")))
(progn

[Code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Is Not Read Only / And Permission On File Appear To Be Just Fine

Aug 20, 2013

(if (findfile MyFile)
  (setq fl (open MyFile "a"))
)

the file exists however the open function still returns nil... the file is not read only, and permission on the file appear to be just fine.What other reasons would there be that cause open function to return nil?This is happening only on one machine. All the others are writing to the file just fine.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Writing File Path To TXT File

Dec 20, 2012

I have a file path im trying to capture in a text file however its not working and autocad is prompting back,

; error bad argument type: streamp nil

 Im assuming its because of the slashbacks but Im not sure..

Hence the code so far...
 
(defun C:GO ()(SETQ ACADLSP (findfile "acad.lsp"))(setq f (open "C: est.txt" "w"))(write-line ACADLSP f)(close f))

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script File To Open Multiple DWG File Not Working In 2012

Dec 22, 2011

I am trying to make a script file to open a drawing and run a lisp routine. They both work independently just fine, the script file will open the all of the files fine... and the lisp is in the startup suite and works in all the files. But when I tell the script file to open the first drawing then run the lisp it hangs trying to open the next file after running the lisp. I have Filedia set to 0, but the message I get when it goes to open the next is "No canvas exists. click New Canvas." (And on top of that... Filedia even set back to 1 still does not display the Dialog box anymore, I have to shut down AutoCAD 2012 and start again then it works.) I Have tried several ways, Opening one at a time then run lisp, and open all files first and then try to run lisp (that closes the file after running) and try and run it again in the next... It will only run the lisp one time and then locks up from there.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Combine All PDF File To One File

Sep 3, 2012

I have more DWG files, all dwg file convert same size (A3 SIZE) PDF file and combine one PDF file. Find script program or lisp program.

I have script program for convert dwg file to pdf file but i don't know all pdf compile one pdf file.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Not Found (CI)

Sep 21, 2012

Autocad 2008. Certain command and mouse control unable function.. which the error dialog box  shown when start up launch the autocad...

" Customization file load failed. File not found: COMMANDLINE.cui

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Name In A List

Aug 26, 2012

I have a list like ("a.dwg" "b.dwg" "c.dwg") and an filename "b.dwg"

I want to know if the file name is a part of the list. which function must be used for this?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Corrupted LSP File

Dec 31, 2011

my LSP file. My computer is stolen and i have a backup in flash memory. I just wanna run it but i think it is corrupted. When i open it, it has codes like.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Macro In MNL File

Aug 27, 2013

I used to have a short, one-line macro in my MNL file that would read the location of the currently active drawing, find the parent directory of that drawing (truncated to 3 levels) and open a Word document in that directory that is named after the project.

For example, if the active drawing path is

"Q:/Projects/12345 Cold Storage/Elevations/Phase 1/North Storage.dwg"

this macro would open the Word document named

"12345 Cold Storage.doc"

that was in the directory

"Q:/Projects/12345 Cold Storage"

If the file did not exist, it would be created named the same as the 3rd level directory.

After i wrote this, it sure sounds like a lot, but as i remember, it was a short, one-liner. Of course if a lisp routine would be better, that's okay too. I understand beggars can't be choosy.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create TXT File

Apr 3, 2012

Looking for example of a lisp file that take the value of a variable and create a txt file on a specific place defining by the user, with 10 lines in each one of them begins with what is in the variable, followed by a text already done.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Save File As TXT?

Oct 30, 2013

I have a Lisp program that is reading information from a .txt file. The problem is, the file we get is an .edi file extension, and right now, the user has to manually change it to a .txt file for the program to run. Can I get autolisp to save the file as a .txt?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Opening DWG File

May 17, 2012

Right now I'm working on a program that will go into a directory and it's subdirectories, collect a list of all the .dwg files in those directories, then apply certain changes to all of those .dwg files. 

My problem is that none of these things works.

(command "open" (srtcat basedir (nth i file)))
(command "open" (nth i fullfile))
(vl-cmdf "open" (strcat basedir (nth i file)))
(vl-cmdf "open" (nth i fullfile))

Where "basedir" is the main directory (e.g. C:/...), file is the list of the dwg file names (e.g. mydrawing.dwg), fullfile is the list of the ull paths (e.g. C:/.../mydrawing.dwg)

I have tried using the filename with and without the .dwg extension with no luck. 

I have this code set in (while ...) so that it will go through all the files in the list "file" or "fullfile" in sequence.  The lisp will run without errors but will not open any of the files.  When I look at the command line, I see that the lisp has put open on the command line like it has executed the command, but right below that, it says "Unkown command: C:/.../mydrawing.dwg" or "Unkown command: dwg" depending on which of the above code pieces I'm using.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Doesn't Run

Aug 28, 2013

I have an AutoLisp file that runs fine with AutoCAD Core Console 2013.  It runs fine when loaded through the standard interface of 2014.  However, it does NOT run using AutoCAD Core Console 2014.  I know there are new security features in 2014.  What has to be done to allow it to run in 2014 AutoCAD Core Console?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create VLX File

Aug 6, 2013

how can i create single " .vlx" file from my lisp and dcl files?  how to convert my lisp to vlx ?

i have to collect my all lisp into the single .lsp file and than convert to .vlx? if it is gonna be like that how about dcl file ?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create New ARG File

Jul 18, 2012

How to create a new .ARG file

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Embedded Data In DWF File

Mar 18, 2012

I'm looking for a way to add custom data in dwf files. We currently create 3D models which get exported to dwf format so that we can share information with clients. Ideally, we'd like them to be able to click on any member and have the software provide additonal information about that part. Example, part number. It would be awesome if the client could then say double click that part and have the actual detailed part drawing open up.

The parts we are trying to reference are generated using a third party application, so they are not solids, but the information is easily accessible in LISP.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Data From DXF File?

Oct 6, 2011

I am trying to write a lisp file that extracts the LAYER, Z, X, Y, TEXT HEIGHT, POINT NUMBER, from the attached DXF file. Ultimately I will have the lisp insert a "POINT" at the X,Y,Z, cords, and then a "TEXT" entity at the same coordinates with the text height value and the point number string. Both entities need to be on the layer ending in  "-PN". The layer name will change depending on the date. I have a third party program that creates the DXF file.

The point of the lisp file is to insert the point numbers and points into my drawing at their correct locations. For the life of me I can not make this work. I have attached the little bit of lisp I have, which unfortunately does not work properly because of it searching for the "TEXT" entry in the DXF file of which there are three per point number. I only need one. I have also attached the DXF file I have. maybe just an overall procedure that I can then code myself? I'm just not good at getting lisp to read a file and extract what I want from it.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Browse For DWG File Selection?

Apr 15, 2012

To get the 'File Selection dialog box' in AutoCAD via LISP, which command should I use other than 'GETFILED' ?

I have a program which using GETFILED to select the drawing file , but I think this dialog box size is too small to browse folder/file , as you cant see the favorites list and you cant resize the dialog box.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Plot In A File Some Windows?

Jan 24, 2001

I need to plot in a file some windows from a LISP, like (command "-plot"...

The windows are defined in a list of points like (((0 0 0)(10 10 0))...) defining lower-left and upper-right corners. Each .plt file must be saved with a different name.

Is it possible from AutoLISP in 2000?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Inserting A Block From A File?

Dec 31, 2013

I want to insert a stored block into a drawing (model space).  Below is the code I'm using and I get Runtime Error '5': Invalid procedure call or argument.

Sub Dummy()
Dim COESTD_obj As AcadBlockReference, InsPtStd(0 To 2) As Long, COESTD As String
COESTD = "C:JimHYDROCAD_DwgsBlocksZ_COE_STDS.dwg"
InsPtStd(0) = 0#: InsPtStd(1) = 0#: InsPtStd(2) = 0# 'Set insertion point as 0,0,0
Set COESTD_obj = ThisDrawing.ModelSpace.InsertBlock(InsPtStd, COESTD, 1#, 1#, 1#, 0#)
End Sub

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Deleting Script File

May 21, 2010

I have a lisp routine that creates a script file and then it runs the script file. After the script has finished running, I want to delete the script file from autocad, but for some reason it doesn't delete.

I've tried using (vl-file-delete path).

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Reading Some Variables Into DWG File?

Jun 5, 2013

How can I read the content/ string in the *.dwg file through autolisp?

Suppose I have used any word multiple times in a sheet. How can I count it through lisp programme?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Does AutoSave Run During A Script (SCR File)

Sep 7, 2012

If created a scripted benchmark test that I've ran several times on two separate machines to collect some numbers.  One located at each of two offices - at opposite ends of a WAN.

There is is one time duration that is way different... in looking at the two machines today I discovered that one machine has Autosave disabled and the other has Autosave set to 30 minutes.

Does Autosave run during a script? ... the script also runs lisp code... Does Autosave run during running lisp code?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete DWG File Properties?

Mar 5, 2010

I am looking for code that will delete all the properties within a DWG file.

Searching the forum, I found the following

; Remove any existing Properties
(dictremove (namedobjdict) "DWGPROPS")

However, further research (forum, testing and help system) indicates that it no longer applies to current releases of AutoCAD so my initial happiness was short-lived!

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Plot To A File Share

Oct 3, 2012

R2012 win7

Can you plot to file using a "file share" location? i.e. \\bcnymfilp01\Parts_Labels\88881"

(vl-cmdf ".plot" "Y" "" "\\bcnymprtp01\Proto Label Printer" "Legal" "I" "Landscape" "N" "E" "Fit" "C" "Y" "monochrome.ctb" "Y" "A" "Y" "N" "Y" "\\bcnymfilp01\Parts_Labels\88881" "Y" "Y")

Everything seems to run but when it comes to the plotting, AutoCAD crashes.

Findfile works fine:

Command: (findfile "\\bcnymfilp01\Parts_Labels\50981.plt")
"\\bcnymfilp01\Parts_Labels\50981.plt"

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Linetype From DWG File

Sep 12, 2013

I've got a linetype that's part of our autocad template file and has been for so long that nobody around here even knows where the original line file is.

I need to extract the linetype out so that I can make some minor modifications.  I did do a search and found a nifty lsp routine from Paul Turvill.  (Here's the thread that pointed me there:  [URL] ..........

I ran it and it SEEMED to work.  All the linetypes in the file it created look good EXCEPT for the one I needed to extract. That one looks like this in the line file:
 
*TREELINE,Series of arcs used to indicate tree drip lines
A,0.0001,-0.0001,

The linetype DOES display properly in the dwg file (meaning lines drawn using it look good).

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File To Plot All Layers ON?

Mar 6, 2013

Lisp file to plot all layers on,

I’m not sure if there is a lisp file that cans Plot All Layers ON at a time instead of going to the long story of the layer properties manager.

Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved