Author Topic: decimal to architec and other UNIT system  (Read 8767 times)

0 Members and 1 Guest are viewing this topic.

DEVITG

  • Bull Frog
  • Posts: 479
decimal to architec and other UNIT system
« on: February 21, 2004, 04:40:07 PM »
Hi all .

Has I born in a metric country, I allways use decimal as UNIT system.

But seldom I need to let the user to choose the unit system he/she want to use.

How it can be done by LISP :oops:
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

daron

  • Guest
decimal to architec and other UNIT system
« Reply #1 on: February 21, 2004, 05:56:03 PM »
Not sure of the question, but have you tried (setvar 'luprec 4)?

DEVITG

  • Bull Frog
  • Posts: 479
not luprec
« Reply #2 on: February 21, 2004, 06:10:59 PM »
Hi daron , luprec hold the decimal after the decimal point
What I'm looking for is to be able to change the way units can be input.

The drawing could be >

Architectural  [ 12' 10 1/4"]
Decimal [123.4589]
engeenirring [12' -0.0005"]
Fractional [0 1/8"]
Scientific [ 10 e 2]

It can be set by the UNITS command

How it can be set from a lisp.
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

daron

  • Guest
decimal to architec and other UNIT system
« Reply #3 on: February 21, 2004, 06:36:22 PM »
try (setvar 'lunits 4). I'm only throwing out what comes to mind as I am not currently on a machine with autocad. I realized after I posted that what I wrote wouldn't be the answer, ah well.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
decimal to architec and other UNIT system
« Reply #4 on: February 21, 2004, 06:46:58 PM »
lunits is the answer ....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

DEVITG

  • Bull Frog
  • Posts: 479
that is
« Reply #5 on: February 21, 2004, 07:04:09 PM »
Hi Daron and Keith that is what I was lookin for.

Thanks again.
 :lol:  :)  :D  :wink:  :!:  :!:
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

rude dog

  • Guest
decimal to architec and other UNIT system
« Reply #6 on: February 21, 2004, 07:30:25 PM »
Code: [Select]

(defun c:sdim ()
(initget 7)
(setq ds (getint "\nEnter <1> for Scientfic <2> for Decimal <3> Engineering <4> Architectural"))
(command "dimunit" ds "")
)
(princ)

I know someone else out there can improve on this.....

DEVITG

  • Bull Frog
  • Posts: 479
ok and now hoe I do .....
« Reply #7 on: February 21, 2004, 07:34:16 PM »
:oops:

As I told you before , I allways use decimal .
If LUNITS is set to 4 how I must input the values
I only can input 12'10
But I can not input 12'10"3/4
How I shal key in the value??? :?:  :oops:  :oops:  :cry:
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

DEVITG

  • Bull Frog
  • Posts: 479
dimunits + lunits
« Reply #8 on: February 21, 2004, 07:38:19 PM »
Hi Rude Dog
 Nice routine , but I change the LUNITS just to input values , maybe I need to change the  DIMUNITS too so the user will be able to DIM in architectural.
Thanks for it
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

Anonymous

  • Guest
decimal to architec and other UNIT system
« Reply #9 on: February 21, 2004, 07:55:14 PM »
I think this will do it...

Code: [Select]

(defun C:UU ()
(initget 7)
(setq UA (getint "\nEnter <1> for Scientfic <2> for Decimal <3> Engineering <4> Architectural"))
(setvar UA)
)
(princ)


rude dog

  • Guest
decimal to architec and other UNIT system
« Reply #10 on: February 21, 2004, 07:58:49 PM »
If it is wrong  it was me RDOG the unknown guest....
Hey DEVITG...this place is the best for any code questions me being a newbie myself I am astounded daily by some of these peoples creativity and knowledge....Enjoy your stay

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
decimal to architec and other UNIT system
« Reply #11 on: February 21, 2004, 08:35:48 PM »
Your distance is 12'-10 3/4" which is equal to 154.75 in decimal or 154 3/4"

To enter a value when LUNITS is set to 4 (architectural) do it this way:

FEET'-INCHES FRACTIONS"
or
INCHES FRACTIONS"

Note the location of the single and double tic marks for the feet and inches designation.

I hope you understand now....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

DEVITG

  • Bull Frog
  • Posts: 479
no fractions allowed
« Reply #12 on: February 21, 2004, 08:57:14 PM »
Hi keith .
I'm missing something
I can type 12' -10"
but I can not put the fractions
Quote
Specify radius of circle or [Diameter] <0'-10">: 0'-10"3/4

Requires numeric radius, point on circumference, or "D".
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
decimal to architec and other UNIT system
« Reply #13 on: February 21, 2004, 09:16:54 PM »
You have to put the inch mark AFTER the fraction and a space between the fraction and full inches as I showed in the above example...

12'-10 3/4"
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

DEVITG

  • Bull Frog
  • Posts: 479
no way tu put fraction
« Reply #14 on: February 22, 2004, 09:33:50 AM »
Keith , please apologize me for so insistent.

Set lunits to 4 , when I put the 0'12-10 it is OK , but when I type an space after the 10 to put the fraction it do an enter and send me a error messg.

Quote
Specify radius of circle or [Diameter] <1'-0">: 0'-103/4"

Requires numeric radius, point on circumference, or "D".

Specify radius of circle or [Diameter] <1'-0">: 0'-10"3/4

Requires numeric radius, point on circumference, or "D".

Specify radius of circle or [Diameter] <1'-0">: 0'-10



Only the last one is ok but I can not put the fractios , what I'm doing wrong???? :oops:  :oops:  :cry:  :cry:
Location @ Córdoba Argentina Using ACAD 2019  at Window 10