Area Field Diesel Expression
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Area Field Diesel Expression

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Clarence
Guest





Posted: Fri Dec 31, 2004 12:18 am    Post subject: Area Field Diesel Expression Reply with quote

I'm using this in a lisp command to get square feet:

">%).Area \\f \"%lu6%qf1 SF\">%"


I understand luprec controls the decimals.

How do I get this to show different types of units i.e. square yards, acres and etc.?

To clarify - What portion do I need to set to a variable to do my calculations for the other types?

Back to top
Clarence
Guest





Posted: Fri Dec 31, 2004 12:22 am    Post subject: Re: Area Field Diesel Expression Reply with quote

More to this>>>>

This is for an Area (by polyline) to Field command (square feet only right now). And its for a dialog box. I have managed to get the rest of this command to work properly. So now I'm adding additional features. I know how I can adjust the decimals. Now I want to add the varying units that we use.

Thanks for any comments and/or suggestions!
Back to top
Tom Smith
Guest





Posted: Fri Dec 31, 2004 1:41 am    Post subject: Re: Area Field Diesel Expression Reply with quote

It's not clear why you'e using diesel. The cvunit function in lisp will do
just about any area conversion you need.

Back to top
Tony Tanzillo
Guest





Posted: Fri Dec 31, 2004 7:32 am    Post subject: Re: Area Field Diesel Expression Reply with quote

"Tom Smith" <nospam> wrote in message

Quote:
It's not clear why you'e using diesel.

Because LISP can't be used in field expressions?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com
Back to top
Clarence
Guest





Posted: Mon Jan 03, 2005 11:25 pm    Post subject: Re: Area Field Diesel Expression Reply with quote

Sorry Tony....but yes it can!

Run field and go to Object and get the area of something. See the formula in Field Expression at the bottom of the Field dialog box. I'm using lisp to manipulate the string and then use mtext to make my field text.

I haven't had to convert units before is all. I will try cvunit as suggested.

Thank you for all help.
Back to top
Clarence
Guest





Posted: Mon Jan 03, 2005 11:26 pm    Post subject: Re: Area Field Diesel Expression Reply with quote

FYI - I learned how to make fields with lisp from this ng.
Back to top
Clarence
Guest





Posted: Tue Jan 04, 2005 12:20 am    Post subject: Re: Area Field Diesel Expression Reply with quote

here's my previous posts that are related to the command I am currently working on. These should clarify what I am doing and why.

entsel missed pick
http://discussion.autodesk.com/thread.jspa?threadID=375035

object id for area field
http://discussion.autodesk.com/thread.jspa?threadID=374256

I am almost done with my command. The unit conversion is the last step. Then I just need to fix a few minor problems and its ready to go.

any other input is appreciated.....

thank you!
Back to top
Tom Smith
Guest





Posted: Tue Jan 04, 2005 1:36 am    Post subject: Re: Area Field Diesel Expression Reply with quote

Per the help docs, unit conversions used by cvunit are in the acad.unt file, which you can modify if necessary. The standard ones should probably handle your needs, though.
Back to top
Clarence
Guest





Posted: Tue Jan 04, 2005 1:44 am    Post subject: Re: Area Field Diesel Expression Reply with quote

thx......thats what i'm hoping!

I encountered some minor bugs that are slowing me down a bit. I'm almost at the point where I can experiment with cvunit.

I'll post a progress report if I can complete this soon.....

Hey, BTW can anyone help with programming the ok and cancel buttons. I want them to check that everything is selected or not before continuing. And follow thru from there with the appropriate actions: place field text or cleanly exit.

Right now I get a bad number error if I select cancel.

Thanks!
Back to top
Clarence
Guest





Posted: Tue Jan 04, 2005 4:08 am    Post subject: Re: Area Field Diesel Expression Reply with quote

Cannot make lisp and diesel see eye to eye. The info I need has to be in the diesel format. i can use cvunit to convert units but cannot transfer the lisp info over to the diesel format

I think I might have found my stopping point on this command.

From what I understand, Fields can utilize Lisp minimally. You can write lisp to replace object id values and etc. But there are only a handful of options that Fields are capable of.
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB