Scripts for templates

Scripts for templates

Anonymous
Not applicable
698 Views
2 Replies
Message 1 of 3

Scripts for templates

Anonymous
Not applicable

I have very little coding experience so please dumb down whatever you say. I work in a small factory where I mostly only need 2D CAD files. Most, if not all are enclosed in a rectangle, with a 1/2" material border. I could not find anything in my research on how to have dialogue boxes open up or on how to run programs in AutoCAD. 

 

I need a way to set up a template that upon opening a new drawing, will ask the height and width of a rectangle, draw it in, and offset it by half of an inch. any help would be greatly appreciated. 

0 Likes
699 Views
2 Replies
Replies (2)
Message 2 of 3

devitg
Advisor
Advisor

Please upload a sample.dwg with an before and an  after 

0 Likes
Message 3 of 3

CodeDing
Advisor
Advisor

@Anonymous ,

 

In all honesty, it sounds like this would be better suited for a Block with an X,Y Parameter (renamed to Height & Width). Then just include this block in your template. It would take the same amount of, if not less, steps and would probably be easier for all users to understand (especially if something were to ever go wrong). See attached example.

 

Best,

~DD

0 Likes