Results 1 to 2 of 2

Thread: Diesel and Field with if statement

  1. #1
    Member
    Join Date
    2007-10
    Posts
    8
    Login to Give a bone
    0

    Default Diesel and Field with if statement

    Basically I am trying to pull the total sq ft. of house based on what is entered into my title block in a field which in turn pulls from a table and if its greater than 2571 to display on the print that the house will require an AC label ,or state that its just a std. house otherwise. Now having the sq ft displayed in my title block as a field i have figured out. This is the diesel formula I'm trying to make work inside a field:

    $(if,$(EQ,$(>=,%<\AcExpr (Table(%<\_ObjId 2127028848>%).A2*Table(%<\_ObjId 2127028848>%).B2) \f "%lu2%pr0">%,2571),1),"SF IS GREATER THAN 2571 - REQUIRES AC LABEL","STD. HOUSE")

    And its actually works when I pick ok to leave the field dialog box, but only once.
    This part of the formula:

    %<\AcExpr (Table(%<\_ObjId 2127028848>%).A2*Table(%<\_ObjId 2127028848>%).B2) \f "%lu2%pr0">%

    disappears and is replaced with the number that was calculated, lets say for example that number was 2625, this is what happens to the formula once I pick ok

    $(if,$(EQ,$(>=,2625,2571),1),"SF IS GREATER THAN 2571 - REQUIRES AC LABEL","STD. HOUSE")

    Is there any way to keep the formula from losing object info?

  2. #2
    Member
    Join Date
    2014-11
    Posts
    5
    Login to Give a bone
    0

    Default Re: Diesel and Field with if statement

    Quote Originally Posted by jcs1112 View Post
    Basically I am trying to pull the total sq ft. of house based on what is entered into my title block in a field which in turn pulls from a table and if its greater than 2571 to display on the print that the house will require an AC label ,or state that its just a std. house otherwise. Now having the sq ft displayed in my title block as a field i have figured out. This is the diesel formula I'm trying to make work inside a field:

    $(if,$(EQ,$(>=,%<\AcExpr (Table(%<\_ObjId 2127028848>%).A2*Table(%<\_ObjId 2127028848>%).B2) \f "%lu2%pr0">%,2571),1),"SF IS GREATER THAN 2571 - REQUIRES AC LABEL","STD. HOUSE")

    And its actually works when I pick ok to leave the field dialog box, but only once.
    This part of the formula:

    %<\AcExpr (Table(%<\_ObjId 2127028848>%).A2*Table(%<\_ObjId 2127028848>%).B2) \f "%lu2%pr0">%

    disappears and is replaced with the number that was calculated, lets say for example that number was 2625, this is what happens to the formula once I pick ok

    $(if,$(EQ,$(>=,2625,2571),1),"SF IS GREATER THAN 2571 - REQUIRES AC LABEL","STD. HOUSE")

    Is there any way to keep the formula from losing object info?
    Don't go back and edit the formula. Just leave it as is. Returning to the editor forces it to show the resolved value. This is the way it works in my custom blocks that have attributes with embedded fields using Ac Expressions . I also embed the field with the AcExpr in a formula object. Maybe this might help you or get you going in the right direction. Sorry no one else has tried to answer this question.

Similar Threads

  1. 2015: compare field value with systemvariable in DIESEL or Autolisp
    By sudhas_albin701870 in forum AutoCAD Customization
    Replies: 0
    Last Post: 2015-06-17, 07:38 PM
  2. Block count in drawing by field or diesel
    By ismail.asi in forum AutoCAD Fields
    Replies: 4
    Last Post: 2011-12-07, 11:04 PM
  3. Can Logic be Added to a Diesel Field...??
    By CADdancer in forum AutoCAD Fields
    Replies: 4
    Last Post: 2011-03-08, 01:07 PM
  4. Is it possible to use an If-Then-Else Statement in a Field
    By Kirkbride in forum AutoCAD Fields
    Replies: 11
    Last Post: 2008-12-08, 10:10 PM
  5. Diesel of a field
    By irneb in forum AutoCAD General
    Replies: 1
    Last Post: 2008-01-15, 05:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •