How to import a Subassembly into the Civil 3D Tool Palette via .NET C# code

How to import a Subassembly into the Civil 3D Tool Palette via .NET C# code

artillis_prado
Enthusiast Enthusiast
382 Views
0 Replies
Message 1 of 1

How to import a Subassembly into the Civil 3D Tool Palette via .NET C# code

artillis_prado
Enthusiast
Enthusiast

 

With this code, I can almost add a Subassembly, and I got it from the Through The Interface blog from 2009. I haven't found much material on this subject, so I'm open to a new way of doing it.

                    string path = "C://pkt//Ferrovias.pkt"
                    ImageInfo ii = new ImageInfo();
                    ii.Size = new System.Drawing.Size(65, 65);

                // And then we use our dummy tool to create the
                // command tool
                    //como importar os subassemblies para a pallete tool
                    tool.CreateCommandTool(
                        pallete,
                        namePKT,
                        ii,
                        "_CreateSubAssemblyTool \"" + path + "\""
                    );

 

I am trying to implement the ImportSubassembly command of the Tool Palette via .Net C# code. When I click on one of these pkt files that I imported with the above code...

artillis_prado_2-1712176302300.png

 

It seems that my code is not recognizing the properties correctly

artillis_prado_1-1712176262898.png

 


When I manually use the Import Subassembly option, it works fine. I want my code to do the same thing

artillis_prado_0-1712176223825.png

 

 

0 Likes
383 Views
0 Replies
Replies (0)