AutoCAD 2013/2014/2015

Reply
Member
Posts: 3
Registered: ‎02-14-2013
Message 1 of 5 (188 Views)

[DXF] Application defined codes in entities

188 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.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,516
Registered: ‎06-29-2007
Message 2 of 5 (181 Views)

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
-------------------------------------------------------------------------
Member
Posts: 3
Registered: ‎02-14-2013
Message 3 of 5 (168 Views)

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?

*Expert Elite*
Alfred.NESWADBA
Posts: 8,516
Registered: ‎06-29-2007
Message 4 of 5 (150 Views)

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
-------------------------------------------------------------------------
Member
Posts: 3
Registered: ‎02-14-2013
Message 5 of 5 (130 Views)

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
}

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube