Author Topic: Dimscale display  (Read 8143 times)

0 Members and 1 Guest are viewing this topic.

Luke

  • Guest
Dimscale display
« on: January 28, 2009, 10:33:54 AM »
I want to create a button that when I click will display the Dimscale on the screen (not on the command line)

I know how to create the button, I'm not sure how to get it to output the result on the screen.

I also want it to convert the dimscale.  So if dimscale is 16 that would equal 3/4" = 1'.  I would end up w/ 15-16-17 different dimscales.





ronjonp

  • Needs a day job
  • Posts: 7529
Re: Dimscale display
« Reply #1 on: January 28, 2009, 10:44:24 AM »
Here's to show on screen with no conversion:

(alert (rtos (getvar 'dimscale)))

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Dimscale display
« Reply #2 on: January 28, 2009, 10:48:34 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Spike Wilbury

  • Guest
Re: Dimscale display
« Reply #3 on: January 28, 2009, 10:52:11 AM »
I'm sure I posted one of my old lisp functions rcmd-showScale

But for some reason, could not found it here....  :roll:

Shinyhead

  • Guest
Re: Dimscale display
« Reply #4 on: January 28, 2009, 11:16:39 AM »
what about modemacro?

I have a nearly identical command that does not use lisp and puts the dimscale as modemacro display.

main difference is it is a set dimscale command, you enter the ratio (i.e. "16" for 3/4"=1'-0") and it updates dimscale and displays the scale you just set until you reset it.

Only hitch is you don't display scale when a drawing is first opened until you hit this button.

^C^C_dimscale;\_MODEMACRO;DIMSCALE=$M=$(RTOS,$(/,12,$(GETVAR,DIMSCALE)))"""=12"""_;

Luke

  • Guest
Re: Dimscale display
« Reply #5 on: January 28, 2009, 11:30:37 AM »
Shiny,
Maybe mine is working wrong? 

When I click my button it puts this on command line and waits for input from me...


Shinyhead

  • Guest
Re: Dimscale display
« Reply #6 on: January 28, 2009, 11:39:14 AM »
thats correct, its to set dimscale and display it.

for just display try this

^C^C_MODEMACRO;DIMSCALE=$M=$(RTOS,$(/,12,$(GETVAR,DIMSCALE)))"""=12"""_;

(not tested, edited on the fly)

Luke

  • Guest
Re: Dimscale display
« Reply #7 on: January 28, 2009, 11:48:22 AM »
My dimscales set automatically when I insert the border.

I can also manually set them by clicking one of the buttons on the dimscale toolbar (see first screen shot beginning of thread)

Or I can click the DIM button and it will read the scale factor of my title block and set the dimscale to match accordingle.

All this is done so I only have one dimension style insetad of one for every scale factor.

The problem is that guys are complaining that if they have a drawing w/ many different title blocks in it they dont know what dimscale they are currently set to.  My solution is to type dimscale and look at our scale facto chart but that is not silver platter enough.  They want it instant...  Click this button and poof tells you it is set to 3/4" = 1' scale. So that is what I'm trying to figure out how to do.

skennedy

  • Guest
Re: Dimscale display
« Reply #8 on: January 28, 2009, 01:03:23 PM »
You could always use diesel:
[$(eval, Dimscale: $(getvar,dimscale))]
Just put it into a pulldown.

deegeecees

  • Guest
Re: Dimscale display
« Reply #9 on: January 28, 2009, 01:09:05 PM »
In your button properties, add a bit of lisp to send a dialog box to the screen as has been suggested, as in:

(alert "3/4=1")... and such, or...

use the MODEMACRO variable. this variable will display text on the bottom left of your application, as in:

(setvar "modemacro" "3/4=1")

Not tested.  <------------Discalimer

Shinyhead

  • Guest
Re: Dimscale display
« Reply #10 on: January 28, 2009, 01:10:52 PM »
also, in newer versions of autocad you can get the scale to display without quite so much code in the format you want, but it depends on if you are using annotative dimensioning and the like.

skennedy

  • Guest
Re: Dimscale display
« Reply #11 on: January 28, 2009, 01:19:23 PM »
You could use DGCS's idea with mine and type modemacro and paste the diesel code: [$(eval, Dimscale: $(getvar,dimscale))] into the new value prompt.
This will tell you the current dimscale setting and it will also update if the dimscale changes.  It will also stay on during the session and you could code it into the overall environment to work every time ACAD opens.

Luke

  • Guest
Re: Dimscale display
« Reply #12 on: January 28, 2009, 03:57:28 PM »
OK so too many time I ask the question here and I'm given "a fish"

I want to learn this stuff but when I only do it like 2 times a year it is tough to really learn and retain.

So I'm going to start over and go little by little...

If I put in the following
(alert "3/4in = 1'") it works

problem is I want this to say 3/4" = 1' not 3/4in

can anybody tell me how to get the " mark to show up on the alert box

dustinthiesse

  • Guest
Re: Dimscale display
« Reply #13 on: January 28, 2009, 04:00:26 PM »
OK so too many time I ask the question here and I'm given "a fish"

I want to learn this stuff but when I only do it like 2 times a year it is tough to really learn and retain.

So I'm going to start over and go little by little...

If I put in the following
(alert "3/4in = 1'") it works

problem is I want this to say 3/4" = 1' not 3/4in

can anybody tell me how to get the " mark to show up on the alert box

(alert "3/4\" = 1'")
EDIT:  Any time you want a quotation mark to show up inside a string you have to escape it with a \ so that the string doesn't end but keeps going.
« Last Edit: January 28, 2009, 04:03:45 PM by d-unit »

Luke

  • Guest
Re: Dimscale display
« Reply #14 on: January 28, 2009, 04:10:22 PM »
this is the site I'm using (in addition to swamp)
http://www.afralisp.net/index.htm

does anybody recommend any others?