The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Hurricane for AutoCAD
 Tips and Tricks
 DIMSCALE in TITLEBLOCK (or any System Variable!?)

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Attach a File

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Admin Posted - July 15 2003 : 7:05:48 PM
This message was put in the Lisp section...

Would anyone be able to convert this lisp so that it can accept any system variable as the third prompt?

Block:
Attribute:
SysVar:

Rather than having it hard-coded to be DIMSCALE?

http://www.74mph.com/forum/topic.asp?TOPIC_ID=77

I'm afraid this might be more that I can chew.
(Or I'm missing something simple)

Regards,
Bill
4   L A T E S T    R E P L I E S    (Newest First)
lurkfear Posted - July 29 2003 : 2:17:01 PM
Or how about GETINT?
lurkfear Posted - July 29 2003 : 2:13:15 PM
How about converting the real number to an integer before making it a string?
Admin Posted - July 29 2003 : 2:01:54 PM
Thanks... my help files seem all screwed up...

I've made a change, and you can enter the SYSVAR of your choice... however, there seems to be an issue with the format of the sysvar outputted.

For instance, if my OSMODE is 231, and want to put that in the title-block, then this routine returns 231.0000. (This can be fixed... below)

You can see from these two lines, that the RTOS has two parameters, cause you have to convert the Number to a String... BUT, it would be nice to be able to truncate any trailing zeros!

The first line is commented out in the lisp, but has the two parameters... you can change the 0 to a 2 for 2 places after the decimal). The second line, doesn't have any parameters, so the conversion goes without any modification.

;(setq newatt1 (RTOS (getvar newatt1) 2 0))
(setq newatt1 (RTOS (getvar newatt1)))

The problem is when you try to put something like LTSCALE (if it was 1.35 for instance), with
;(setq newatt1 (RTOS (getvar newatt1) 2 0))
you would get 1 instead of 1.35. (I'm still not quite sure about the first parameter being "2", which is called "mode", maybe this is the key..., but again, my help is all screwed up... I had my hopes up with much mention to the DIMZIN system variable, and how it effects RTOS in the newsgroups. I played with it, but it doesn't seem to effect my output... Argh...

I'm not sure if there is an easy way to trim ".000" from a string (if it exists), or just any trailing zero (in the case of "1.35000"). Again, I'm not that familiar with lisp, but with the above in mind, you can easily add the parameter to the lisp before running it, or remove it.

I'd love a solution that took care of this automatically!!

Here is the new file...
Download Attachment: TB_WIZ1_SYSVAR.zip
1.1 KB
lurkfear Posted - July 29 2003 : 12:53:47 PM
I was recently doing some research for RTEXT concerning DIESEL string expressions . In AutoCAD's help system there is a huge section on how to get the output of a known system variable with lisp.

The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.14 seconds. Snitz Forums 2000