Showing results for 
Search instead for 
Did you mean: 

CAD import via C# API

Valued Contributor
Valued Contributor

Hi all,


i'm new here and I'm sorry if this question was already asked (couldn't find it via search):


I want to import cad files via the C# API into Process Simulate 12.0 TR1, but couldn't find any related command in the help file. Is this even possible?





Re: CAD import via C# API


I would also be interested in knowing if it is possible to programmatically insert objects into a robcad study (without having to manually create them within a resource library and having to create instances for the study).

If not in Process Simulate - is it possible in Robot Expert?

Best regards


Re: CAD import via C# API

Siemens Legend Siemens Legend
Siemens Legend

The short answer is – yes you can.

The long answer:

You will need to create a new command, so that the “execute” method should parse the file.for each object you'll need to create a creational object, and use its parent's creation method.


E.g.: if the files contains a list of flow location operation (one line per object) your code may looks like:


public void Execute()
     TxObjectFlowOperation targetForimport=…
     foreach(line in file)
        ImportFlowLocationOperation(line, targetForimport)

void ImportFlowLocationOperation(String line, TxObjectFlowOperation targetForimport) { String name=ReadFlowLocatoinOperationNameFromFile(Line); ..//read other attributes TxObjectFlowLocationOperationCreationData data = new TxObjectFlowLocationOperationCreationData(name); var objFlow=targetForimport.CreateObjectFlowLocationOperation(data);
// update other objFlow properties