Adding Custom Panel to existing Schematic Tab with C#

Adding Custom Panel to existing Schematic Tab with C#

Anonymous
Not applicable
521 Views
1 Reply
Message 1 of 2

Adding Custom Panel to existing Schematic Tab with C#

Anonymous
Not applicable

I'm trying to add a panel to the already existing "schematic" tab.

 

When I load my dll using the autocad2017doc.lsp file with netload, the schematic tab doesn't have any panels and only loads the custom panels.

 

When I launch AutoCAD without the .lsp file, then the panel is added successfully.

 

This tells me that the custom dll is loaded before the UI is completely generated.  Is there a different interface that I can use besides IExtensionApplication that would cause my custom application to be loaded after the UI is generate?

 

 

 

0 Likes
522 Views
1 Reply
Reply (1)
Message 2 of 2

dgorsman
Consultant
Consultant

I *really* dislike programmatically generated Ribbon content...  PITA to manage, in development, implementation, and for the user.

 

OK, first order of business: do NOT use the ACADNNNN.lsp or ACADDOCNNNN files.  Those are for AutoCAD use.  Use ACAD.LSP and ACADDOC.LSP, respectively; they don't come with the program, you need to make them.  Unlike the version named files these can be located in a common network location.

 

While you can manually call NETLOAD command in the startup LSP file to load customization DLLs it's not the ideal way.  Demand-loading through a registry key, and using the package XML system, are the preferred methods.  The latter can be easier as it can also dynamically add search paths when the package is loaded (and only when loaded).

 

Yes, loading is done before the UI has been completely drawn.  There's a couple of ways around it but if your Ribbon content will never change in-session, I'd highly recommend you just create a CUIx file and partially load it.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.