• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD 2013/2014 DWG Format

    Reply
    Member
    Posts: 3
    Registered: ‎02-14-2013

    [DXF] Application defined codes in entities

    118 Views, 4 Replies
    02-14-2013 12:27 AM

    I'm looking for a way to tag entities (for example arc) in a DXF with an numeric ID of my choosing. I've been trying to understand the DXF reference and find examples of how to do it, but there is not much information available. My interpretation of the standard is that I'm allowed to do this:

     

    0
    ARC
    8
    Layer1
    10
    -1.734315
    20
    -1.975000
    40
    0.300000
    50
    225.000027
    51
    270.000065
    102
    {MYAPPLICATION
    2000
    13
    102
    }

     

    Where 2000 is my application defined code and 13 is my numeric ID value.

     

    Is this correct use of application defined codes?

     

    EDIT: I also asked a similar question at stackoverflow, without anyone being able to answer it.

    Please use plain text.
    *Expert Elite*
    Posts: 6,474
    Registered: ‎06-29-2007

    Re: [DXF] Application defined codes in entities

    02-14-2013 12:38 AM in reply to: dagur_

    Hi,

     

    look to Extended-Entity-Data (EED) in the DXF-documentation (>>>details<<<), there you can assign some additional values to each element.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Member
    Posts: 3
    Registered: ‎02-14-2013

    Re: [DXF] Application defined codes in entities

    02-14-2013 12:54 AM in reply to: alfred.neswadba

    Like this?

     

    0
    ARC
    8
    Layer1
    10
    -1.734315
    20
    -1.975000
    40
    0.300000
    50
    225.000027
    51
    270.000065
    1001
    MYAPPLICATION
    1070
    13

    Am I using xdata correctly? Also, is this correct/better way to define my numeric ID?

    Please use plain text.
    *Expert Elite*
    Posts: 6,474
    Registered: ‎06-29-2007

    Re: [DXF] Application defined codes in entities

    02-14-2013 01:21 AM in reply to: dagur_

    Hi,

     

    the easiest way to verify how EED's should be stored is to create a new drawing, then draw a new line, start command _XDATA (from the express tools) and add test data to this line.

    Afterwards save the file as DXF and look to the EED how it's stored.

     

    Good luck, - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Member
    Posts: 3
    Registered: ‎02-14-2013

    Re: [DXF] Application defined codes in entities

    02-14-2013 06:51 AM in reply to: alfred.neswadba

    Thank you, this solves my problem. Using _XDATA as suggested, Autocad added the following to my arc description:

     

    1001
    MYAPPLICATION
    1002
    {
    1070
        12
    1002
    }

    Please use plain text.