cancel
Showing results for 
Search instead for 
Did you mean: 

Insert component into PS when cell is not loaded

Pioneer
Pioneer

Hello,

 

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

Regards

2 REPLIES

Re: Insert component into PS when cell is not loaded

Creator
Creator

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.

Re: Insert component into PS when cell is not loaded

Pioneer
Pioneer

 

The code above is working when the cell is loaded.

But what I would like to do is loading component out of cell structure:

2016-09-13 09_11_15-Process Simulate.png

It allowes to load component without  file: TuneData.xml in .cojt.

 

Regards