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

how to create a XRef in .NET?

3 REPLIES 3
Reply
Message 1 of 4
wesbird
380 Views, 3 Replies

how to create a XRef in .NET?

Hi,
Is anyone has a sample of creating a xref in .net (C# or VB.NET) ?



Thank you
Wes
Windows 10 64 bit, AutoCAD (ACA, Map) 2023
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: wesbird

This works, but I don't know if it the best way.
Maybe somebody will comment.

[code]
Point3d refPoint = new Point3d(0.0, 0.0, 0.0);

ObjectId xrefId = db.AttachXref(dwgPath, blkName);

BlockReference br = new BlockReference(refPoint, xrefId);

[/code]

wrote in message news:5257781@discussion.autodesk.com...
Hi,
Is anyone has a sample of creating a xref in .net (C# or VB.NET) ?



Thank you
Wes
Message 3 of 4
Anonymous
in reply to: wesbird

Here is actual class I tested with. It includes one overloaded
method so you can xref at the origin or give coodinates. Could
someone please look at this and make sure I'm not giving him
wrong info. One note..I shouldn't have use the name "AttachXref"
which is the the managed method name.

Thanks,
Paul

"Paul Richardson" wrote in message
news:5260036@discussion.autodesk.com...
This works, but I don't know if it the best way.
Maybe somebody will comment.

[code]
Point3d refPoint = new Point3d(0.0, 0.0, 0.0);

ObjectId xrefId = db.AttachXref(dwgPath, blkName);

BlockReference br = new BlockReference(refPoint, xrefId);

[/code]

wrote in message news:5257781@discussion.autodesk.com...
Hi,
Is anyone has a sample of creating a xref in .net (C# or VB.NET) ?



Thank you
Wes
Message 4 of 4
Anonymous
in reply to: wesbird

Have you noticed that the xref doesn't show up in the External References palette list?

Has anyone else seen this?

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