Valued Mentor
Posts: 391
Registered: ‎01-27-2010
Message 1 of 2 (95 Views)

How to create a block with a Att for display path of Xref

95 Views, 1 Replies
07-17-2012 02:59 AM

Hi all.

i looking a way for create a block after selected a Xref.


It is for display the path+Name of my Xref.


It use fields manualy put i can copy/paste the bloc. (ObjectId not egual in a 2 dwg).


I want :

1 - selec the Xref --> I know how to do that.

2 - create a bloc --> I know.

3 - create a att -> i know

4 - fill the att with the field --> ???


can you help me ?

*Expert Elite*
Posts: 2,084
Registered: ‎04-29-2006
Message 2 of 2 (91 Views)

Re : How to create a block with a Att for display path of Xref

07-17-2012 03:27 AM in reply to: AubelecBE

There was some thread about using Fields in AutoCAD DevBlog.


Assuming attRef is the attribute reference instance and xrefId the xref ObjectId (not tested):

attRef.TextString = String.Format("%<\AcObjProp Object(%<\_ObjId {0}>%).Path>%", xrefId.OldIdPtr)



Gilles Chanteau
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.