Electrical component access from dll

Electrical component access from dll

vince.krueger
Advocate Advocate
291 Views
2 Replies
Message 1 of 3

Electrical component access from dll

vince.krueger
Advocate
Advocate

I asked on the .NET forum and am not getting any responses, so I figured I would ask here also.

 

I have an external C# application that i use to feed commands to the NETLOAD-ed dll that I created, and it generally works fine.  I have the normal accoremgd, acdbmgd and acmgd dlls in my dll.

 

What i am not finding in the resources, or searching the forum (or the web for that matter) is a way to access the electrical components (Project, Schematic, Panel).  Is there another dll that I need to reference?

 

Right now the dll method seems to be good for very basic normal operations, but I am struggling finding a way to make it useful in complex situations like I have (working in multiple electrical projects on many drawings, including creating new drawings and moving between open drawings [session mode does not seem to help there either])

 

0 Likes
Accepted solutions (1)
292 Views
2 Replies
Replies (2)
Message 2 of 3

daniel_cadext
Advisor
Advisor
Accepted solution

I found a couple of threads while doing forum search, looks like there’s no .NET API

https://forums.autodesk.com/t5/autocad-electrical-forum/autocad-electrical-api/td-p/5468969

https://forums.autodesk.com/t5/autocad-electrical-forum/dll-s-for-electrical-api-in-c-net/td-p/97601...

https://forums.autodesk.com/t5/autocad-electrical-forum/missing-dlls-for-autocad-electrical-api-deve...

 

the last link is interesting, there’s Autodesk.AutoCAD.Electrical.Interop.Common.dll, Autodesk.AutoCAD.Electrical.Interop.Data.dll, so apparently there’s some support for Automation.

 

Those lisp functions like (ace_closeproject) should be available via .NET’s equivalent of acedInvoke.

 

I’d start by investigating what’s in interop

 

 

 

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes
Message 3 of 3

vince.krueger
Advocate
Advocate

Thank you Daniel, that is what I was afraid of. 

 

I created an application in Excel with VBA years ago that does everything I need by using the LISP commands. 

 

I kept getting questioned by other AutoCAD users when I would ask off the wall questions to fix issues I was running into.  As a group they said I should basically abandon what I was doing and move into c# dll in the application.  I started porting that way, then started having even more issues than I had before (thus thinking I was missing a dll).

 

Hopefully AutoCAD comes out with something soon.

 

Thanks again