API Starting point - Exporttoautocad

API Starting point - Exporttoautocad

Anonymous
Not applicable
1,694 Views
9 Replies
Message 1 of 10

API Starting point - Exporttoautocad

Anonymous
Not applicable

I am needing to process a lot of Plant3D models and Exporttoautocad. I having the following problems...

 

- Sometimes xref's bind, sometimes they don't.

- I open the Xref and sometimes Exporttoautocad works, sometimes it doesn't.

- If it does, sometimes the Xref is located correctly to 0,0, sometimes it isn't.

 

you get the idea

 

I've developed for AutoCAD casually in the past and I'm pretty sure I could work through this if I had the time, but I don't at this moment. Is there a repository of available .NET code similar to the way you used to be able to find AutoLISP routines? I looked in the SDK samples and nothing stood out. Thoughts, suggestions, direction? Thank you.

0 Likes
1,695 Views
9 Replies
Replies (9)
Message 2 of 10

TomislavGolubovic
Alumni
Alumni

I've done this exact script in VBA if it matters, its not .NET though.



Tomislav Golubovic
Technical Specialist - Plant and Infrastructure
Autodesk Australia / New Zealand
Autodesk, Inc.
Autodesk ANZ YouTube Channel
0 Likes
Message 3 of 10

Anonymous
Not applicable

Are you willing to share that? Thank you.

0 Likes
Message 4 of 10

TomislavGolubovic
Alumni
Alumni

For what version of Plant3D?



Tomislav Golubovic
Technical Specialist - Plant and Infrastructure
Autodesk Australia / New Zealand
Autodesk, Inc.
Autodesk ANZ YouTube Channel
0 Likes
Message 5 of 10

Anonymous
Not applicable

The project at hand is in 2016, but most are in 2017. I planed to port your VBA code to c#, or at least as a guide for creating c# solution. Thanks.

0 Likes
Message 6 of 10

TomislavGolubovic
Alumni
Alumni

I can't give you the source code, but happy to give you the script to run on your own files if you want. I can give you a 2017 version at best.



Tomislav Golubovic
Technical Specialist - Plant and Infrastructure
Autodesk Australia / New Zealand
Autodesk, Inc.
Autodesk ANZ YouTube Channel
0 Likes
Message 7 of 10

jabowabo
Mentor
Mentor
Is it necessary to remove all P3D data? An etransmit with the object enabler would save you a lot of time.
If you must, you can use the .Net BindXrefs method to bind, or you can iterate the xref dB's and deep clone all objects to one db. Explode all P3D items down to blocks to remove the data.
0 Likes
Message 8 of 10

Anonymous
Not applicable

Sure, PM me a link or your email address. Thank you!

0 Likes
Message 9 of 10

Anonymous
Not applicable

I'm afraid it is, My goal is to export it to a .sat file for use in a 3rd party application. That export process only accepts solids, surfaces... native AutoCAD 3D geometry.

 

Can you provide me more information about the deep clone workflow? Example link, whatever. I would like to learn more about that, thanks.

0 Likes
Message 10 of 10

jabowabo
Mentor
Mentor

This is one approach:

 

0 Likes