See the top rated post in this thread. Click here

Results 1 to 4 of 4

Thread: Custom Field / Save 'additional format'

  1. #1
    Active Member
    Join Date
    2008-07
    Posts
    55
    Login to Give a bone
    0

    Angry Custom Field / Save 'additional format'

    Hello all-

    I am using a combined field / mtext to list the area of an given object. My drawing is in millimeters, and I need the area displayed in SQUARE METERS. Unfortunately, due to the units of my drawing, the default area calculations come back in SQUARE MILLIMETERS. This isn't really a problem, as I can fix this in the "additional format" window of the Field(s).

    So, my text is tied to a field with the following:
    OBJECT > AREA > DECIMAL (with a custom additional format to list SM)

    The problem is I have not found a way to save this 'custom' conversion back to SM. Each time I re-connect the mtext object I need to manually re-apply the 'custom' additional format. It's a waste of precious time!

    Is there a way to create a custom/user-defined field that will always be available?

    The string / field expression is:
    %<\AcObjProp.16.2 Object(%<\_ObjId 8796069715536>%).Area \f "%lu2%ps[,SM]%ct8[1e-006]">%

    Help? Thanks!

  2. #2
    Member
    Join Date
    2009-09
    Posts
    5
    Login to Give a bone
    1

    Default Re: Custom Field / Save 'additional format'

    To solve this, you need to add some code to acfields.fdc.

    First, close Autocad completely.

    This file can be found at (windows 7) C:\Users\xxx\AppData\Roaming\Autodesk\AutoCAD yyy\R17\enu\Support
    You'll have to open it with notepad and search for the following code:
    <FormatType name="Area">
    <Formats>
    <Format>
    <DisplayName resource="471" src="AcFieldRes.dll"/>
    <FormatString/>

    After the second line <Formats> you have to copy-paste the following text:

    <Format>
    <DisplayName>Square meters</DisplayName>
    <FormatString>%lu2%ps[,SM]%ct8[1e-006]</FormatString>
    </Format>

    When you open Autocad again, you'll find your custom user field that will always be visible.

    Good luck!

  3. #3
    Woo! Hoo! my 1st post
    Join Date
    2014-11
    Posts
    1
    Login to Give a bone
    0

    Default Re: Custom Field / Save 'additional format'

    Quote Originally Posted by jpyeatt View Post
    Hello all-

    I am using a combined field / mtext to list the area of an given object. My drawing is in millimeters, and I need the area displayed in SQUARE METERS. Unfortunately, due to the units of my drawing, the default area calculations come back in SQUARE MILLIMETERS. This isn't really a problem, as I can fix this in the "additional format" window of the Field(s).

    So, my text is tied to a field with the following:
    OBJECT > AREA > DECIMAL (with a custom additional format to list SM)

    The problem is I have not found a way to save this 'custom' conversion back to SM. Each time I re-connect the mtext object I need to manually re-apply the 'custom' additional format. It's a waste of precious time!

    Is there a way to create a custom/user-defined field that will always be available?

    The string / field expression is:
    %<\AcObjProp.16.2 Object(%<\_ObjId 8796069715536>%).Area \f "%lu2%ps[,SM]%ct8[1e-006]">%

    Help? Thanks!
    unfortunately it doesn't work for me.

  4. #4
    Woo! Hoo! my 1st post
    Join Date
    2017-09
    Posts
    1
    Login to Give a bone
    0

    Default Re: Custom Field / Save 'additional format'

    Quote Originally Posted by jan.vanderborght View Post
    To solve this, you need to add some code to acfields.fdc.

    First, close Autocad completely.

    This file can be found at (windows 7) C:\Users\xxx\AppData\Roaming\Autodesk\AutoCAD yyy\R17\enu\Support
    You'll have to open it with notepad and search for the following code:
    <FormatType name="Area">
    <Formats>
    <Format>
    <DisplayName resource="471" src="AcFieldRes.dll"/>
    <FormatString/>

    After the second line <Formats> you have to copy-paste the following text:

    <Format>
    <DisplayName>Square meters</DisplayName>
    <FormatString>%lu2%ps[,SM]%ct8[1e-006]</FormatString>
    </Format>

    When you open Autocad again, you'll find your custom user field that will always be visible.

    Good luck!

    Hello,

    The solution that you wrote is perfect.
    I tried to use the same method to add a new format in "formulas", but in the cfields.fdc i could not found any think related. I was wondering if there is also a way to add new format to formulas.

    I added field>object>area>sqm (my new format)
    i wanto to add field>formulas>new format

    Thaks.

Similar Threads

  1. how to save field format in block
    By bstk in forum Dynamic Blocks - Technical
    Replies: 1
    Last Post: 2014-06-25, 10:31 AM
  2. Replies: 0
    Last Post: 2012-07-09, 01:56 PM
  3. Replies: 39
    Last Post: 2007-02-06, 07:08 PM
  4. Replies: 7
    Last Post: 2006-09-05, 06:47 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
  •