Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SCRIPTS

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
1172 Views, 3 Replies

SCRIPTS

Hi, I'm using a script with insert command.

I want the script to load a DWG file from a folder inside the location of the script.

 

for ex:

 

the script and my DWG file is in C:\ 

I want the script to insert a file to the DWG from C:\folder 

 

can I do that?

3 REPLIES 3
Message 2 of 4
Kent1Cooper
in reply to: Anonymous

Yes.

 

INSERT C:\Your\File\Path\YourDrawingName

 

Make sure you include an Enter at the end [for an empty line below that one] if that's the last thing in the Script.

Kent Cooper, AIA
Message 3 of 4
Kent1Cooper
in reply to: Anonymous

Now it's occurring to me to wonder....  Some people use the word "script" around here in a more generic sense than AutoCAD's definition of the word.  My previous Reply is about AutoCAD's meaning, using a .SCR filetype, invoked with the SCRIPT command specifically.  If you meant it more loosely, as some people use the word, intending something like a macro or an AutoLisp routine, that would make a difference.  [For example, you can't use single backslashes as file path separators in AutoLisp, because they are used to trigger certain control characters, so you need to use either forward slashes or double backslashes.]  But it can be done through any of those approaches -- you just need to use the right syntax for the particular approach.

Kent Cooper, AIA
Message 4 of 4
Anonymous
in reply to: Kent1Cooper

I'm new to coding for autocad so I don't know yet the small staff.

I'm working on a C++ code that will generate a command chain

so by script I was referring to the .SCR file

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta