cancel
Showing results for 
Search instead for 
Did you mean: 

Add geometory to LogicalGroup

Experimenter
Experimenter

I added an element add to "LogicalGroup" using TxLogicalGroup.Add() method.

But after I wished because it was an error, it wasn't obtained.

Is there anyone who knows about how to "Add LogcalGroup".

 

Thanks,

 

(Sample code)

// Create grometory TxComponent targetComp = ....; // Created by PhyscalRoot.CreateEquipment()

TxPolylineCreationData polyData = new TxPolylineCreationData(----);

TxPolyeLine polyLine = targetComp.CreatePolyline(polyData);

TxSolidByExtrudeCreationData extrudeData = new TxSolidByExtrudeCreationData(----);

targetComp.CreateSolidByExtrude(extrudeData);

// Create group

TxLogicalGroup parentGroup = ....; // Parent group is TxLogicalGroup("Group2")

string strGroupName = "SubGroup_1";

TxLogicalGroupCreationData gpData = new TxLogicalGroupCreationData(strGroupName);

TxLogicalGroup targetGroup = parentGroup.CreateLogicalGroup(gpData);

targetGroup.Add(targetComp); // This code exception ("Error in the application.").

5 REPLIES

Re: Add geometory to LogicalGroup

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

You can add already existing component to the logical group, or if you want to create the component you should follow the steps described here.

 

After that, the code for logical group that you use is correct:

 

// Create group
TxLogicalGroup parentGroup = ....;               // Parent group is TxLogicalGroup("Group2")
string strGroupName = "SubGroup_1";
TxLogicalGroupCreationData gpData = new TxLogicalGroupCreationData(strGroupName);
TxLogicalGroup targetGroup = parentGroup.CreateLogicalGroup(gpData);
targetGroup.AddObject(targetComp);            

        

 

 

Re: Add geometory to LogicalGroup

Experimenter
Experimenter

Hi DianaG

 

Thank you for your reply.

I will try that step.

 

 

Re: Add geometory to LogicalGroup

Experimenter
Experimenter

Hi DianaG

 

I tried the sample of component creation.

But TxNotSupportedInTCPlatformException was thrown and could not be executed.

I forgot to tell you, but I have implemented add-on for PS-R connected to TC.

 

Is there restriction on creating models in this environment?

 

Thanks

 

Re: Add geometory to LogicalGroup

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi KKuwahara,

 

Yes, the code, that I gave you a link to, is only for PS on eMS.

We don't support component creation on Teamcenter platform via the API yet.

You can add the geometry to already existing component and add that component to the Logical Group.

 

Best Regards,

Diana

Re: Add geometory to LogicalGroup

Experimenter
Experimenter

Hi Diana

 

I understood that it is an environmental problem. I will consider another method.

Thank you.