CAD Forums > CAD General

diesel help.

(1/1)

hudster:
I have a variable, user1, when i type user1 on the command line it returns a value of 100.

how do i get that value to be inserted in a command?

i wish to use this to set the lTscale value, but don't have a clue about diesel.

Keith™:
You have not specified which user variable you are using. User has strings, reals and integers ...
such as
USERS1
USERR1
USERI1
For this example I will simply use x in place of the data type. For diesel it makes no dofference anyway.


--- Code: ---$M=$(getvar, userx1)
--- End code ---


You need to insert this into the button command, where the scale factor is requested, simply use that bit of code. For example, when you insert with a scale of 50 ...

--- Code: ----insert dwgname;\50;50;\
--- End code ---


use this instead..

--- Code: ----insert dwgname;\$M=$(getvar, userx1);$M=$(getvar, userx1);\
--- End code ---


Good luck

Navigation

[0] Message Index

Go to full version