using getvar for calculations

MechMan (archive)

Usenet Archive
Joined
Jul 14, 2003
Messages
4
Reaction score
0
I'm back with another simple question. How do you use a system variable in a calculation to set another variable? I'll use the DIMSCALE variable for an example. Let's say I want to write an equation using the DIMSCALE variable to help set another variable. What's the proper format? I've tried several variations of:

(getvar "dimscale")/2

but no dice yet.

TIA

MechMan
 
Another example:

(setvar "dimscale" (/ r1 2.0))

to set dimscale (or other var) to a value.

Bill
 
Ok, here's a continuation of this subject. What was offered above works great for some commands but now I want to scale my limits based on the DIMSCALE variable but the LIMITS command doesn't seem to like it. I've tried different variations of:

LIMITS;0,0;(*12 (getvar "dimscale")),(*9 (getvar "dimscale"));

Note: this is a button macro I'm creating. I don't know LISP.

What I'm trying to do is to set the max limits to be "DIMSCALE" x initial value given (x=12,y=9) in a template file.

Yes it's probably crude but it's all I know.

Any ideas on how I can get this to work?

MechMan
 

Latest threads

Back
Top