Area Field Diesel Expression

Discussion in 'AutoCAD' started by Clarence, Dec 30, 2004.

  1. Clarence

    Clarence Guest

    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?
     
    Clarence, Dec 30, 2004
    #1
  2. Clarence

    Tom Smith Guest

    It's not clear why you'e using diesel. The cvunit function in lisp will do
    just about any area conversion you need.
     
    Tom Smith, Dec 30, 2004
    #2
  3. Because LISP can't be used in field expressions?
     
    Tony Tanzillo, Dec 31, 2004
    #3
  4. Clarence

    Clarence Guest

    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.
     
    Clarence, Jan 3, 2005
    #4
  5. Clarence

    Clarence Guest

    FYI - I learned how to make fields with lisp from this ng.
     
    Clarence, Jan 3, 2005
    #5
  6. Clarence

    Clarence Guest

    Clarence, Jan 3, 2005
    #6
  7. Clarence

    Tom Smith Guest

    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.
     
    Tom Smith, Jan 3, 2005
    #7
  8. Clarence

    Clarence Guest

    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!
     
    Clarence, Jan 3, 2005
    #8
  9. Clarence

    Clarence Guest

    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.
     
    Clarence, Jan 3, 2005
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.