Cancel
Showing results for 
Search instead for 
Did you mean: 

TxLibraryStorage Class

Valued Contributor
Valued Contributor

How do you actually use the TxLibraryStorage Class class for Process Simulate?  There is no assisgment method and nothing in the constructor to pass a component object.  So how do I pass a component to the class so I can access the Fullpath property?

2 REPLIES

Re: TxLibraryStorage Class

Are you trying to find the file path location of an object?

Re: TxLibraryStorage Class

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi TGSimulation,

 

Here is an example (note if the component is open for modeling, then the StorageObject is of type TxLocalStorage)

ITxObject obj = TxApplication.ActiveSelection.GetItems()[0];
TxStorage storage = (obj as ITxStorable).StorageObject;

TxLibraryStorage libraryStorage = storage as TxLibraryStorage;

if (libraryStorage != null)
{
      string cojtPath = libraryStorage.FullPath;
       //your logic here
}