TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Dommy2Hotty on December 25, 2004, 09:59:14 AM

Title: Converting a GETDIST variable to feet and inches
Post by: Dommy2Hotty on December 25, 2004, 09:59:14 AM
Here's what I have for my menu code:
Code: [Select]
(setq dist1 (getdist "Horizontal Room Size : "));\\(setq dist1 (rtos dist1 4));+
(setq dist2 (getdist "Vertical Room Size : "));\\(setq dist2 (rtos dist2 4));+
(setq roomsize (strcat dist1 "x" dist2));+
(setvar "users2" roomsize);


What I get after the strcat is:
Code: [Select]
"10'x12'-6\""

But that messes up the eval I have in the pull down from the users2 variable:
Code: [Select]
$(EVAL,??)

Taking users2 and creating text with it yields:
Code: [Select]
10'x12'-6"

I want the code after the strcat, after setting users2, and after creating text all to display:
Code: [Select]
10'-0"x12'-6"

Suggestions?  :twisted:
Title: Converting a GETDIST variable to feet and inches
Post by: David Bethel on December 25, 2004, 10:04:18 AM
Check out UNITMODE and DIMZIN sysvars.  They control the way (rtos) displays. -David
Title: Converting a GETDIST variable to feet and inches
Post by: Keith™ on December 25, 2004, 10:21:53 AM
David is correct. You need to at least turn off the "suppress zero inches" option. If you set DIMZIN to 1 it will resolve the issue, but may cause other issues with dimensioning. If that is the case, you may want to set the value of DIMZIN in your macro, then reset it to its previous value when done.
Title: Converting a GETDIST variable to feet and inches
Post by: Dent Cermak on December 25, 2004, 10:56:59 AM
on Christmas morning ???
Title: Converting a GETDIST variable to feet and inches
Post by: Dommy2Hotty on December 25, 2004, 02:31:52 PM
Quote from: Dent Cermak
on Christmas morning ???

Was bugging me last night...

Okay...so I was coding within the acad.dwt with just the Standard dimstyle...installed my dimstyle and it worked perfectly the way it was already coded....thank you very much...I'll give the wall a rest from my head... :crazy:
Title: Converting a GETDIST variable to feet and inches
Post by: Keith™ on December 25, 2004, 03:21:31 PM
Quote from: Dent Cermak
on Christmas morning ???

Didn't you know this is my only hobby, you wouldn't want to deny me my only joy on Christmas day would you?
Title: Converting a GETDIST variable to feet and inches
Post by: Dent Cermak on December 25, 2004, 06:54:27 PM
you need to go play with Dr. Demento. That's my kind of hobby. Ya'll could play "Create the Psychosis". I'd start  off staring at her and drooling. When she says "What's wrong with you?" ( and they ALL will ask you that if you follow this plan.) You can say, " You tell me!" Makes her wonder, keeps you busy.