Jump to content

drawing status bar/tray


yrnomad

Recommended Posts

I remember maybe 5 years ago or so, I worked at a company and their drawing's dimscale was displayed down on the status bar/tray near the ortho/snap/grid information.

Anyone know if this is something they did custom, or if it is a setting I can turn on somewhere for 2010?

Thanks

Link to comment
Share on other sites

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    22

  • alanjt

    12

  • MarcoW

    7

  • StevJ

    5

Top Posters In This Topic

Posted Images

yes, that would be something called MODEMACRO. It can display many variables from within AutoCAD. It uses the DIESEL language (if i remember correctly)

Link to comment
Share on other sites

Ok, I see how I can input the text I want, but how do I get it to display the active dimscale?

I tried:

modemacro

"Dimscale (getvar "dimscale")

and it displayed just what I typed.

Link to comment
Share on other sites

;This program state user name, dimension scale, current text size, current fillet radius.

(defun-q S::STARTUP ()

(command

"modemacro"

"Mr YOUR NAME: DSc=$(getvar,dimscale).TSz=$(getvar,textsize). ALT_U=$(getvar,DIMALTF)."

)

)

 

Add this to acad.lsp

Link to comment
Share on other sites

(defun-q sym ([arguments] [/ variables...]) expr...)

 

The defun-q function is provided strictly for backward-compatibility with previous versions of AutoLISP, and should not be used for other purposes. You can use defun-q in situations where you need to access a function definition as a list structure, which is the way defun was implemented in previous, non-compiled versions of AutoLISP.

 

 

Sorry Lee, my English is not strong enough to explain so I paste it from AutoLISP Reference Guide.

 

I don't remember how long I use it. Picture below show bottom of Acad2008 ( new toy) and Acad 2002.

Have good night Lee!:)

ScreenShot001.gif

ScreenShot002.gif

Link to comment
Share on other sites

;This program state user name, dimension scale, current text size, current fillet radius.

(defun-q S::STARTUP ()

(command

"modemacro"

"Mr YOUR NAME: DSc=$(getvar,dimscale).TSz=$(getvar,textsize). ALT_U=$(getvar,DIMALTF)."

)

)

 

Add this to acad.lsp

you shouldn't redefine the S::STARTUP as you are, if it already exists, you are overwriting it with just your startups.

instead, try something like:

(defun-q MB:STARTUP () (setvar "modemacro" "Mr YOUR NAME: DSc=$(getvar,dimscale).TSz=$(getvar,textsize). ALT_U=$(getvar,DIMALTF)."))

(setq S::STARTUP (append S::STARTUP MB:STARTUP))

 

that way, you just add on, instead of overwriting. i also changed it to setvar, to avoid using command.

Link to comment
Share on other sites

here's my modemacro coding, lots of goodies:

      (setvar
       "modemacro"
       "($(edtime, $(getvar,date),H:MMam/pm) - $(edtime,$(getvar,date),M.DD.YY))  Textsize: $(getvar,textsize) $(if, $(!=, $(getvar,viewtwist), 0), Viewtwist: $(angtos, $(getvar,viewtwist) [, 0, 2]) , ) Dimscale: $(getvar,dimscale) $(if, $(!=, $(getvar,filletrad), 0), FilletRad: $(getvar,filletrad), ) $(if, $(=, $(getvar,worlducs), 1),*WCS* ,*NON-WCS*) "
     )

this will display the date, time, viewtwist (if not 0), filletrad (if not 0), dimscale, textsize and displays WCS or NON-WCS depending on if my ucs changes.

Link to comment
Share on other sites

you shouldn't redefine the S::STARTUP as you are, if it already exists, you are overwriting it with just your startups.

instead, try something like:

(defun-q MB:STARTUP () (setvar "modemacro" "Mr YOUR NAME: DSc=$(getvar,dimscale).TSz=$(getvar,textsize). ALT_U=$(getvar,DIMALTF)."))

(setq S::STARTUP (append S::STARTUP MB:STARTUP))

that way, you just add on, instead of overwriting. i also changed it to setvar, to avoid using command.

 

Thanks Alan, that helps me understand it a bit more :)

Link to comment
Share on other sites

This is great, but as I was trying this out, it seems there's a difference between TEXTSIZE and text height. I was hoping that as I changed the text height, the TEXTSIZE value would change to reflect this, but as you can see in the pic below, TEXTSIZE remains 0.08 even though height value is 0.14. The status bar always shows .08, regardless of the height value, and I can find no variable value that corresponds to current text height.

What am I doing wrong?

 

Steve

TEXTSIZE.JPG

Link to comment
Share on other sites

This is great, but as I was trying this out, it seems there's a difference between TEXTSIZE and text height. I was hoping that as I changed the text height, the TEXTSIZE value would change to reflect this, but as you can see in the pic below, TEXTSIZE remains 0.08 even though height value is 0.14. The status bar always shows .08, regardless of the height value, and I can find no variable value that corresponds to current text height.

What am I doing wrong?

 

Steve

nothing, the (getvar "textsize") refers to the set/default text size. the text height you are looking at is based on the settings of the text style.

Link to comment
Share on other sites

This will get what you want:

 

(defun tHgt ( )
 (vla-get-Height
   (vla-get-ActiveTextStyle
     (vla-get-ActiveDocument
       (vlax-get-acad-object)))))

 

sadly, you can't put that in the statusbar :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...