0

Is it possible to use variables in the creation of objects in AutoCAD? For example, I would like to create a number of circles and have their diameter property determined by a custom variable. This would allow me to easily change the value of multiple objects after creation.

It seems like an easy thing to do, but I can't seem to find an answer to this question.

Clarification:
I simply want to have easy programmatic control over the defining characteristics of a number of objects for easy modification at a later date.

DakotaD
  • 371
  • 3
  • 18
  • Let me make sure I get what you're asking. You want to define a variable and use it to modify objects that are already created? – Trae Moore Oct 02 '13 at 01:10
  • And/or assign it to a property of a new object? – Trae Moore Oct 02 '13 at 01:19
  • I think I see what is being asked after reading it several times. You want to create objects (in this case circles) which you could change properties (in this case diameter) in a single shot without having to deal with them individually. You could have a routine (LISP/VBA/.NET) that creates any entities you want to change with a bit of XData. Then a separate routine could grab all the entities, filter out those with XData, and change the desired property to a parameter passed to the routine. – Parrish Husband Oct 02 '13 at 13:47
  • I think my verbiage may have added to the confusion on this question. I was using the term variable in the general sense; AutoCad seems to use the term to describe its command-line inputs. – DakotaD Oct 02 '13 at 19:50

2 Answers2

1

It doesn't seem possible do this in just one step, but using the parameteric tools allows some degree of programmatic change after object creation.

In the example of the circle, diameter control can be achieved using the DIMCONSTRAINT command in conjunction with a user defined parameter. Use PARAMETERS command to access all of the drawing's parameters.

DakotaD
  • 371
  • 3
  • 18
0

If you're planning on using the in-process libraries, you can create a custom command that takes a parameter from the AutoCAD command line, which you could use to create your circles.

Parrish Husband
  • 3,148
  • 18
  • 40