I want to create e new resource with the API (v. 11). In the software it works over the menu "Modeling" -> "Create Part/Resource" -> "New Resource" and choose the type!
I've tryed "CreateLocalComponent" and "CreateCompoundResource" but that's not what I want.
Can someone help me with some code?
thanks for the answer.
I checked the link, but I want to add an existing .cojt file. For now I use the FolderBrowserDialog, but this has no preview window! Maybe it is safer to write your own dialog with a preview window!
Then you need only this part of the code:
//5. Import the new component TxInsertComponentCreationData insertData = new TxInsertComponentCreationData("comp1", path); ITxComponent comp = TxApplication.ActiveDocument.PhysicalRoot.InsertComponent(insertData);
You can implement your own command with UI that will show also preview.