Author Topic: Converting a GETDIST variable to feet and inches  (Read 1412 times)

0 Members and 1 Guest are viewing this topic.

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Converting a GETDIST variable to feet and inches
« 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:

David Bethel

  • Swamp Rat
  • Posts: 641
Converting a GETDIST variable to feet and inches
« Reply #1 on: December 25, 2004, 10:04:18 AM »
Check out UNITMODE and DIMZIN sysvars.  They control the way (rtos) displays. -David
R12 Dos - A2K

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16727
  • Superior Stupidity at its best
Converting a GETDIST variable to feet and inches
« Reply #2 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.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Dent Cermak

  • Needs a day job
  • Posts: 6914
  • Clinton, Mississippi
Converting a GETDIST variable to feet and inches
« Reply #3 on: December 25, 2004, 10:56:59 AM »
on Christmas morning ???
If you are looking to me for answers, you really have problems. Carlson Survey 2016 w/ Embedded AutoCad

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Converting a GETDIST variable to feet and inches
« Reply #4 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:

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16727
  • Superior Stupidity at its best
Converting a GETDIST variable to feet and inches
« Reply #5 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?
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Dent Cermak

  • Needs a day job
  • Posts: 6914
  • Clinton, Mississippi
Converting a GETDIST variable to feet and inches
« Reply #6 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.
If you are looking to me for answers, you really have problems. Carlson Survey 2016 w/ Embedded AutoCad