Display full version of the post: Assign a variable instead a numerical value

Silvia_sds
30.05.2013, 19:51
Hi everyone, I have a question about AutoCAD 2013: is it possible to assign a variable (for example to a line) instead a numerical value? So I'll be able to change it whenever I want without extend or trim lines.Thank you

Vladimir Michl
31.05.2013, 07:57
What is a "numerical value" of a line? Do you mean its length, or XData record, or some kind of a label?

For length, you can use AutoCAD parametric functions (see the Parametric ribbon).

Kent Cooper
31.05.2013, 14:24
I'm not quite sure I understand exactly what you mean, either, but is something like LENGTHEN with the Total option what you want to do?  You could build a function that would feed a variable into that for the total length, and leave the User to select Lines they want to be that length:
 
(command "_.lengthen" "_total" YourVariableValue)

CarlB
31.05.2013, 22:33

If you did this, how would the changed variable know which end of the line to change, or if both?

heinsite
02.06.2013, 09:32
With parametric constraints AutoCAD knows which direction a line was drawn so it will know which end to modify.  In this case however what the OP is calling a variable would actually involve changing a constant (line length).Dave.

Kent Cooper
03.06.2013, 15:02
CarlB wrote:

If you did this, how would the changed variable know which end of the line to change, or if both?
Lengthen with the Total option just moves the end nearer where you pick the object, leaving the other end in place.  [I don't have a new-enough version to have constraints, which may affect that.]  The variable would only be a number representing the desired length, though we still haven't heard from the OP about whether that's what is meant in their question.