Results 1 to 5 of 5

Thread: How to customize field expression

  1. #1
    Login to Give a bone
    0

    Default How to customize field expression

    Is there a way to customize the display format of custom property. For example I have a custom property named part_no with a 13 Digit value 1234567890123.
    In the title block I would like the value to show up with blanks in order to enhande legibility. Example: 1 234 56 78 90 123

    Any help would be great

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: How to customize field expression

    No as far as I know, w/o customization.

    So you can't just store the property as 1 234 56 78 90 123 ?
    R.K. McSwain | CAD Panacea |

  3. #3
    Login to Give a bone
    0

    Default Re: How to customize field expression

    No, the number is propagated to a DB and should not Change - only the representation

  4. #4
    I could stop if I wanted to
    Join Date
    2015-10
    Location
    Central New Jersey
    Posts
    439
    Login to Give a bone
    0

    Default Re: How to customize field expression

    Could you give us a little more insight as to how and where the part number is propagated?

    Sometimes you can perform some functions on numbers to extract certain place values. Example: Start with 1234, divide it by 100, results in 12.34, format it as a decimal number with a space instead of a ".", results in 12 34. Or, truncate the 12.34 result for a result of 12. Multiply that result by 100 to get 1200, then subtract that from the original 1234 for a result of 34. It would take several carefully crafted field formulas.
    Last edited by MMccall; 2017-02-17 at 10:25 PM.

  5. #5
    I could stop if I wanted to
    Join Date
    2001-07
    Posts
    319
    Login to Give a bone
    0

    Default Re: How to customize field expression

    number to string (itoa)
    string to list (vl-string->list)
    reverser list
    pattern add space. (ascii " ") -> add to list
    caracter to string (chr) -> list
    reverse the new list.

Similar Threads

  1. Field Diesel Expression for LT to bring up last layout
    By Darren Allen in forum AutoLISP
    Replies: 5
    Last Post: 2016-06-17, 02:18 AM
  2. read field expression of an attribute
    By alberto.boffi695984 in forum AutoLISP
    Replies: 4
    Last Post: 2011-06-02, 07:29 AM
  3. Customizing field expression
    By amarkovi in forum Dynamic Blocks - Technical
    Replies: 5
    Last Post: 2009-03-31, 06:00 PM
  4. Field expression change
    By csiress in forum AutoCAD Fields
    Replies: 3
    Last Post: 2007-11-20, 06:37 PM
  5. Replies: 1
    Last Post: 2007-06-06, 05:50 PM

Posting Permissions

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