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?
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
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.
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.
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.