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

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

99 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,129
Registered: ‎04-29-2006
Message 2 of 2 (95 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.