Results 1 to 6 of 6

Thread: Thousands separator in a field

  1. #1
    Member
    Join Date
    2009-02
    Location
    Montreal, Quebec
    Posts
    26

    Default Thousands separator in a field

    I have a db with a field that indicates a position. Now I'm looking a way to separate the thousands by a blank.
    In my country the standards when we indicate a number is to separate the thousands by a space instead of a comma.
    A number should be like this ; 1 000,00 instead of 1,000.00.
    A million should look as 1 000 000.
    So if someone has any idea that I can use in my field attribut ...

    Thank

  2. #2
    All AUGI, all the time arshiel88's Avatar
    Join Date
    2005-02
    Location
    Off the Grid
    Posts
    548

    Lightbulb Re: Thousands separator in a field

    What version of AutoCad you are using? I hope it already have the "Additional format" button.

    But in the position field, the thousand separator is grayed out. I only saw it enabled on area properties. Nevertheless, you can still use it, just need an extra work.

    In the Field Editor, the field expression will look like this.

    Code:
    %<\AcObjProp Object(%<\_ObjId 8796084288624>%).InsertionPoint \f "%lu2%pt1%ds44">%
    The additional format is defined by what is inside the quotation marks next to "\f". But AutoCAD prevents us from editing the field expression so we need a workaround. Copy the field expression to clipboard. Paste to Notepad then add "%th32" in the format. That is, using a space (ascii character 32) as thousand separator. The expression will now look like this.

    Code:
    %<\AcObjProp Object(%<\_ObjId 8796084288624>%).InsertionPoint \f "%lu2%pt1%ds44%th32">%
    Again copy. Then switch to AutoCad, edit the text (not in the field editor) and just paste it over.

    Shielbern Bolalin
    Architectural 3D Renderer
    ----------------------------------------------------------------------
    “A clever person solves a problem. A wise person avoids it.”

    1879-1955

  3. #3
    Member
    Join Date
    2009-02
    Location
    Montreal, Quebec
    Posts
    26

    Default Re: Thousands separator in a field

    I`m running 2012 and I have followed the steps to the last line.
    when you say to edit the text do you mean in the editor or when I insert the block and ddedit ?

  4. #4
    All AUGI, all the time arshiel88's Avatar
    Join Date
    2005-02
    Location
    Off the Grid
    Posts
    548

    Default Re: Thousands separator in a field

    Quote Originally Posted by chbouthot View Post
    I`m running 2012 and I have followed the steps to the last line.
    when you say to edit the text do you mean in the editor or when I insert the block and ddedit ?
    No. When you DDEDIT an attribute, you are only changing that specific attribute. Must be on the Block Editor.
    Sorry, I thought it was a normal text object, my bad. In block editor, when you are editing the attribute, make necessary adjustment for the field, then copy the field expression, paste in Notepad, add the "%th32",again copy the edited expression as described in my previous post then paste in the Default value in Edit Attribure Definition window. The long text should display as a shaded "InsertionPoint" + the prefix/suffix if any, otherwise there is something wrong with the expression.
    When you redefine the block, attributes in previously created blocks will not update. It will only apply for new blocks inserted after the modification.

    Shielbern Bolalin
    Architectural 3D Renderer
    ----------------------------------------------------------------------
    “A clever person solves a problem. A wise person avoids it.”

    1879-1955

  5. #5
    Member
    Join Date
    2009-02
    Location
    Montreal, Quebec
    Posts
    26

    Default Re: Thousands separator in a field

    Hi,

    This is so great because now it works as I wanted.
    It is exactly what I needed and now I will adapt it on different blocks.
    I can also do a copy of the block instead of inserting it and do a redraw, that`s it.
    Thanks a lot for your help and your time

    Christian

  6. #6
    All AUGI, all the time arshiel88's Avatar
    Join Date
    2005-02
    Location
    Off the Grid
    Posts
    548

    Default Re: Thousands separator in a field

    You're welcome. I'm glad to hear it's working fine.

    Shielbern Bolalin
    Architectural 3D Renderer
    ----------------------------------------------------------------------
    “A clever person solves a problem. A wise person avoids it.”

    1879-1955

Similar Threads

  1. Thousands separator in coordinate
    By eth378946 in forum AutoCAD Fields
    Replies: 2
    Last Post: 2011-05-17, 07:21 AM
  2. 2011: Thousands of Annotation Scales....
    By aspencer.226869 in forum AutoCAD General
    Replies: 3
    Last Post: 2010-07-09, 04:46 PM
  3. 2008 C3D - thousands of messages scrolling by..
    By piper in forum CAD Management - General
    Replies: 10
    Last Post: 2009-08-13, 02:10 PM
  4. tangent labels set with z value in the hundred thousands
    By munoze_99 in forum Land Desktop - General
    Replies: 3
    Last Post: 2006-05-12, 05:32 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
  •