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

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

98 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,106
Registered: ‎04-29-2006
Message 2 of 2 (94 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
Need installation help?

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