Jump to content

Recommended Posts

Posted

I'd like to start off by saying this lisp is not 100% complete. I'm working on this not because I have a need for it, but I wanted to have some routines I can show off. I don't want to use VL because I haven't made it that far.

 

Problems:

Unit's and precision do not work on this. I know how to change it but wonder, what's the best way of doing it? Condition argument?

 

example of what I was planning on doing:

(cond ((eq "Architecture" unit)(setq u 4)... and so on

 

Just looking for tips and suggestions.

 

Thanks

MTool.zip

Posted
I'd like to start off by saying this lisp is not 100% complete. I'm working on this not because I have a need for it' date=' but I wanted to have some routines I can show off. I don't want to use VL because I haven't made it that far.

 

Problems:

Unit's and precision do not work on this. I know how to change it but wonder, what's the best way of doing it? Condition argument?

 

example of what I was planning on doing:

(cond ((eq "Architecture" unit)(setq u 4)... and so on

 

Just looking for tips and suggestions.

 

Thanks[/quote']

 

I used something like this in an old dimstyle program I wrote.

This is from that program, To give you an example :

 

(cond
 ((= UNT "Decimal")      (setvar "DIMLUNIT" 2))
 ((= UNT "Engineering")  (setvar "DIMLUNIT" 3))
 ((= UNT "Architectural")(setvar "DIMLUNIT" 4))
 ((= UNT "Fractional")   (setvar "DIMLUNIT" 5)))

 

Use setvar and DIMLUNIT to set your units.

I think you will get the idea.

 

Also look into:

System Variables

LUNITS Sets linear units

 

LUPREC Sets the number of decimal places displayed for all read-only linear units, and for all editable linear units whose precision is less than or equal to the current LUPREC value

 

MEASUREINIT Sets the initial drawing units as imperial or metric

 

MEASUREMENT Sets drawing units as imperial or metric for the current drawing only

 

UNITMODE Controls the display format for units

Posted

(cond
 ((= UNT "Decimal")      (setvar "DIMLUNIT" 2))
 ((= UNT "Engineering")  (setvar "DIMLUNIT" 3))
 ((= UNT "Architectural")(setvar "DIMLUNIT" 4))
 ((= UNT "Fractional")   (setvar "DIMLUNIT" 5)))

Thank you for taking a look at this. Wouldn't this change the setting rather than temporarily change the settings like

(cond ((eq "architecture" unit)(setq u 4)))...
(rtos di (atoi u)(atoi p))

Posted
Thank you for taking a look at this. Wouldn't this change the setting rather than temporarily change the settings like

(cond ((eq "architecture" unit)(setq u 4)))...
(rtos di (atoi u)(atoi p))

 

Im sorry, I was under the impression you wanted to change the setting.

Could you be more specific as to what your aim is?

Posted

I'm sorry. I know I have a problem with making things clear. Ill post tomorrow because I'm on my phone. its hard to type on. Again, thank you for your time.

Posted

No problem. See you then unless you have got your answer by that time.

 

Good Luck

Posted

If your writing the program then change all required variables in one go to what you want not the person drafting so it always works, just remember to save them back to the original settings when the program is finished a couple of hints always do angular calculations in radians autocad is written that way and working in degrees can sometime using default unit settings not work the way you expect. Were lucky were metric so dont have to worry about feet & inches.

Posted

Thank you for all the help. I got it to work.

 

Suggestions on how to improve are greatly appreciated.

Mtoolv1.1.zip

Posted

New question but for the same job. I was thinking it would be great if the unit's popup list changed the wording of the precision popup list. Is this possible in dcl?

 

Example if in architectural the popup list would display 1/4" 1/8" etc and if in Decimal it would display 0.0 0.00 etc

Posted

You can do that with mapcar add_list but the contents must be clear to user to know the right choose for the conversion.

 

Regards,

Posted

What's your Honest opinion of this program? I realize it's probably not useful to anyone but it was a great training tool for me to write.

Posted
New question but for the same job. I was thinking it would be great if the unit's popup list changed the wording of the precision popup list. Is this possible in dcl?

 

Example if in architectural the popup list would display 1/4" 1/8" etc and if in Decimal it would display 0.0 0.00 etc

 

 

Here is an example by Lee, I used it in my ANSI Flange Lisp in my signature.

Example.dcl

Example.lsp

Posted

Nice! thank you

 

:lol:

"Shame you can't afford it! :)"

Posted
. I was thinking it would be great if the unit's popup list changed the wording of the precision popup list. Is this possible in dcl?

 

My answer was directed to your question about if it is possible' date=' and I said you can do ... but ....

And to give you a [b']honest[/b] opinion, I do not have one in mind right now, but if I had once, I would give it to you . certainly

 

Good luck.

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...