Creating a script from a drawing

Creating a script from a drawing

Anonymous
Not applicable
1,483 Views
7 Replies
Message 1 of 8

Creating a script from a drawing

Anonymous
Not applicable

Hey guys,

I am pretty new to the Autocad world and i was wondering, if i have a specific drawing, is it possible for me to get Autocad to show the script commands required to generating this drawing?

The reason i am asking is that i am interesting in generating a set drawings based on the output form another program. To make the job easier, i was wondering if i could have the 2D drawing made first and then "steal" the command lines for my program in order to make the generation of the scripts easier.

 

Thanks in advance!

/Sam

 

 

0 Likes
1,484 Views
7 Replies
Replies (7)
Message 2 of 8

rkmcswain
Mentor
Mentor
AutoCAD has an "action recorder" that is designed to capture action while you draw, edit, etc. and allow you to replay it in the future.

http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS73099cc...




R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 3 of 8

Anonymous
Not applicable

Hi Mcswain,

Thanks for the reply,

 

Correct me if i am wrong, but the action recorder is a tool record "real-time" what you are drawing. I was thinking more of something that shows the exact commands of an existing drawing. E.g. if i have a cross section of a pipe, i would be able to see how that would look in "script language"

 

/Sam

0 Likes
Message 4 of 8

dbroad
Mentor
Mentor

No.  The only chance you have to get a command history is during the session in which the geometry is created.  You can log the history by either turning the logfileon and then logfileoff or by using the copyhist command.  Please note that this does not create a script.  Dialog actions cannot be captured by the command history either.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 5 of 8

dgorsman
Consultant
Consultant

Drawing content is stored as entities with their own specific properties, not the steps taken to create them.  What is described is more typical of a parametric design program like Inventor.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 6 of 8

Anonymous
Not applicable

 Hmm alright. Thanks

0 Likes
Message 7 of 8

Anonymous
Not applicable

Hi Dgorsman!

That is exactly what i was thinking. My logical then tells me, i should be able to a script/set of data, with a specific property, e.g. a cross-section of a pipe with all the measurements and then load it directly into autocad.

0 Likes
Message 8 of 8

dgorsman
Consultant
Consultant

Kinda-sorta, but not really as you have described it.  Yes, you could create a routine to draw lines, circles, etc. with variable inputs to dictate what the drawing looks like (larger pipe, etc.).  But you don't get that from an existing drawing.  You would need to design the algorithm yourself based on required input and desired output.  That includes modifying an existing drawing using new values.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes