Dimscale - Command or Sysvar?
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Dimscale - Command or Sysvar?

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
bthatcher
Guest





Posted: Tue Apr 05, 2005 11:52 pm    Post subject: Dimscale - Command or Sysvar? Reply with quote

I am trying to use the Dimscale value as a multiplier, I am having trouble getting the value. I get the error 'no function definition: DIMSCALE*'. Here is the code:

(SETQ DSCL (GETVAR "DIMSCALE"))

and in another lisp I set it using:

(command "dimscale" "96")

Which makes me wonder if it is a Command or a Sysvar, it is listed as a variable. And that is the same way I get the value of other variables like 'OSMODE'.
How can I use the Dimscale value in a Lisp? Thanks.

Back to top
Warren Trost
Guest





Posted: Wed Apr 06, 2005 12:00 am    Post subject: Re: Dimscale - Command or Sysvar? Reply with quote

This is a system variable and your example is correct. How have you defined
your action in your program.

Your error message:
error 'no function definition: DIMSCALE*'

looks like you have defined a function DIMSCALE*` which may be causing the
error.



"bthatcher" <nospam@address.withheld> wrote in message
news:25977832.1112730766528.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
I am trying to use the Dimscale value as a multiplier, I am having trouble
getting the value. I get the error 'no function definition: DIMSCALE*'.

Here is the code:
Quote:

(SETQ DSCL (GETVAR "DIMSCALE"))

and in another lisp I set it using:

(command "dimscale" "96")

Which makes me wonder if it is a Command or a Sysvar, it is listed as a
variable. And that is the same way I get the value of other variables like

'OSMODE'.
> How can I use the Dimscale value in a Lisp? Thanks.
Back to top
bthatcher
Guest





Posted: Wed Apr 06, 2005 12:21 am    Post subject: Re: Dimscale - Command or Sysvar? Reply with quote

Here is the code:

(
defun c:RC()

(SETQ DSCL (GETVAR "DIMSCALE"))

(SETQ AMIN (DSCL .1 *)
(SETQ AMAX (DSCL .2 *)

(command "REVCLOUD" "A" AMIN AMAX "O" "L" "")

(princ)
)

I'm not sure about the Math and use of variables, I can't get past the "no function definition: DIMSCALE*" error to debug it. Thanks again.

Back to top
Jeff Mishler
Guest





Posted: Wed Apr 06, 2005 12:31 am    Post subject: Re: Dimscale - Command or Sysvar? Reply with quote

Try pasting each line into the command line....... what do you expect (SETQ
AMIN (DSCL .1 *) to do? If it's this: DSCL times 0.1 (as I suspect) then it
needs to be written as (* DSCL 0.1). Also, both (setq statements need a
closing paren.

(SETQ AMIN (* DSCL 0.1))
(SETQ AMAX (* DSCL 0.2))





--
Jeff
check out www.cadvault.com
"bthatcher" <nospam@address.withheld> wrote in message
news:9502906.1112732511815.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
Here is the code:

(
defun c:RC()

(SETQ DSCL (GETVAR "DIMSCALE"))

(SETQ AMIN (DSCL .1 *)
(SETQ AMAX (DSCL .2 *)

(command "REVCLOUD" "A" AMIN AMAX "O" "L" "")

(princ)
)

I'm not sure about the Math and use of variables, I can't get past the "no
function definition: DIMSCALE*" error to debug it. Thanks again.
Back to top
Adesu
Guest





Posted: Wed Apr 06, 2005 4:28 am    Post subject: Re: Dimscale - Command or Sysvar? Reply with quote

Hi bthatcher

Quote:
(SETQ DSCL (GETVAR "DIMSCALE"))
(setvar "DIMSCALE" 96)

"Dimscale" in not command,it system variable


bthatcher <nospam@address.withheld> wrote in message
news:25977832.1112730766528.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
I am trying to use the Dimscale value as a multiplier, I am having trouble
getting the value. I get the error 'no function definition: DIMSCALE*'.

Here is the code:
Quote:

(SETQ DSCL (GETVAR "DIMSCALE"))

and in another lisp I set it using:

(command "dimscale" "96")

Which makes me wonder if it is a Command or a Sysvar, it is listed as a
variable. And that is the same way I get the value of other variables like

'OSMODE'.
> How can I use the Dimscale value in a Lisp? Thanks.
Back to top
Tom Smith
Guest





Posted: Wed Apr 06, 2005 8:33 pm    Post subject: Re: Dimscale - Command or Sysvar? Reply with quote

Dimscale is a variable, like osmode and many others. However. for quite a few versions now it has been possible to set system variables by typing their names -- before that we had to use the setvar command. So I'd say that all the sysvars are also commands now, in a sense. You can set them through the (command) function, though I think it's more clear if you use (setvar) and (getvar) on them.
Back to top
Warren Trost
Guest





Posted: Wed Apr 06, 2005 9:44 pm    Post subject: Re: Dimscale - Command or Sysvar? Reply with quote

What Jeff has done here is to make the numbers "real" inside the parenthesis
by adding a 0 in front of the period.


"Jeff Mishler" <jeff_m@cadvault.com> wrote in message
news:4252f5af_2@newsprd01...
Quote:
Try pasting each line into the command line....... what do you expect
(SETQ
AMIN (DSCL .1 *) to do? If it's this: DSCL times 0.1 (as I suspect) then
it
needs to be written as (* DSCL 0.1). Also, both (setq statements need a
closing paren.

(SETQ AMIN (* DSCL 0.1))
(SETQ AMAX (* DSCL 0.2))





--
Jeff
check out www.cadvault.com
"bthatcher" <nospam@address.withheld> wrote in message
news:9502906.1112732511815.JavaMail.jive@jiveforum1.autodesk.com...
Here is the code:

(
defun c:RC()

(SETQ DSCL (GETVAR "DIMSCALE"))

(SETQ AMIN (DSCL .1 *)
(SETQ AMAX (DSCL .2 *)

(command "REVCLOUD" "A" AMIN AMAX "O" "L" "")

(princ)
)

I'm not sure about the Math and use of variables, I can't get past the
"no
function definition: DIMSCALE*" error to debug it. Thanks again.

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB