Showing results for 
Search instead for 
Did you mean: 

[Tx13.0] Import Mfg



I defined some files that contain Mfg names.

My goal is to import the Mfgs to a study by the API.

In detail I want to do the same as i can do manually in the PowerBar.

  1. Enter a MfgName in Quick search,
  2. find the mfg on the Mfg library
  3. display the Mfg in the study

How can I do this by the API?


Re: [Tx13.0] Import Mfg


Hello @MarkusH


I believe the first step (import MFGs) can only be done with additional libraries (not tecnomatix.dlls).I'm not experienced with that, but there is an "eM-PlannerAPIManual.chm" file in TX DVD installation that exposes more libraries that may help you achieve your goal.


The second step you can do in a very straight forward way (if rivets are loaded in the study):


1 - Collect all MFGs in a TXObjectList (using TxApplication.ActiveDocument.MfgRoot.GetAllDescendants());

2 - Loop through each object and compare the Name property with desired name to search.

3 - Once you find it, you can implement ITxDisplayableObject interface to the object to be able to display it (using Display() method).



Re: [Tx13.0] Import Mfg


Hello @FredCastro

I did not know that there is another API available Smiley Surprised

Thanks a lot for the info on planner API. I will read through it.

At first sight I could not find a method for importing Mfgs to a study.


Re: [Tx13.0] Import Mfg




you can do it with eM-Planner API.

I have no experience with MfgParts, but I have added a tool Instance from library to a study. In the case of tool instance you need to add with eM-Planner-API a shortcut to the tool instance and after that reload the study in PS.

I would suggest to get an study with the MfgPart, note the external id and discover the sturcture of the study with Planner-API.

I have not found anywhere description of the struture, that have been created. Smiley Sad

In order to work with planner API you need to get EMPTYPELIBRARYLib.EmpContext. The structure has a single memeber sessionId, which can be set from TxApplication.ActiveDocument.eMSSessionId.


Disclaimer: it all right just if you use PS with eM-Server.