I am trying to implement functionality which enable inserting component from library into PS when any cell is not loaded.
So, simply speaking: I am trying write a code which makes the same as when we pick the .cojt from Windows Explorer and drop on GraphicViever in PS.
I used following code:
string path = TxApplication.SystemRootDirectoryNormalized + "dummy_comp.cojt";
TxInsertComponentCreationData insertData = new TxInsertComponentCreationData("comp1", path);
ITxComponent comp = TxApplication.ActiveDocument.PhysicalRoot.InsertComponent(insertData);
The "dummy_comp.cojt" is located directly under SysRootPath.
When I run it I got exception: 'Tecnomatix.Engineering.TxNotImplementedException'
Do you have any idea, what I am doing wrong ?
Should I do somthing more before calling PhysicalRoot.InsertComponent(insertData) ?
I use PS V11.1
I may be wrong. But I think that you must have a study loaded to be able to use most functions in modelling. Which includes import and create component.
The code above is working when the cell is loaded.
But what I would like to do is loading component out of cell structure:
It allowes to load component without file: TuneData.xml in .cojt.