.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1 REPLY 1
Reply
Message 1 of 2
AubelecBE
240 Views, 1 Reply

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

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 ?

1 REPLY 1
Message 2 of 2
_gile
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
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost