Cancel
Showing results for 
Search instead for 
Did you mean: 

How to get where TxPlanningObjects are stored?

Valued Contributor
Valued Contributor

I'm trying to find a way to the path to where the TxPlanningObjects are stored.  For Engineering objects, I was able to use the TxLibraryStorage class to achieve this.  But it doesn't work for Planning objects as there is no

'StorageObject' method.

 

I tried to go through the fields for the object, but the only one that seems to be relevant is the field

"threeDRep".  However this field just returns a TxPlanningObject, so I am right back where I started.

 

5 REPLIES

Re: How to get where TxPlanningObjects are stored?

Pioneer
Pioneer

Hi, TGSimulation!

 

The easiest way to achieve this task is to use the eM-Planner API. The IEmpThreeDRep interface has FileName property:

Dim empContext As New EMPTYPELIBRARYLib.EmpContext With {.sessionId = TxApplication.ActiveDocument.eMSSessionId}
        Dim threeDrepWorker As New EmpThreeDRep
        Dim path As String = threeDrepWorker.FullPath(
            empContext,
            New EmpObjectKey() With
                {
                    .objectId = DirectCast(threedRep.PlatformServicesProvider, ITxEmsServicesProvider).InternalId
                })

 

Re: How to get where TxPlanningObjects are stored?

Valued Contributor
Valued Contributor

Thank you for your reply. 

 

Where are you finding EmpThreeDRep class?  I do not see that anywhere.  Is that available in 13.1  (which is what I am using) I wonder?

Re: How to get where TxPlanningObjects are stored?

Valued Contributor
Valued Contributor

Okay, I did find the EmpThreeDRepClass in the EMPMODELLib.dll in C:\Program Files\Tecnomatix_13.1\eMPower.

 

The EMPTYPELIBRARYLib.dll is in that directory, too, but also in the C:\Program Files\Tecnomatix_13.1\eMPower\DotNetCommands, which is where I was looking, because that is where I am putting custom commands.

 

Re: How to get where TxPlanningObjects are stored?

Pioneer
Pioneer

TGSimulation,

 

sorry for a delay. I would use the EMPTYPELIBRARYLib from eMPower and not from DotNetCommands. By adding the reference to this library set Embed Interop Types to False.

Re: How to get where TxPlanningObjects are stored?

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi TGSimulation,

 

If you go through the fields, you need to go through "threeDRep" -> "file" -> "fileName"

You can get that using the TxEmsTraversalManager & TxEmsCacheManager.

 

Best Regards,

DianaG