Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi, i would like to know how to open multiple files by copying the file names from an excel or notepad?
Use VB and VB API to Creo.
Should work.
Alternatively, if you don't know one of the toolkits, record a mapkey of opening one file and then copy paste it over and over into one large mapkey only changing the file input line. You can also create a script in the programming language of your choice to generate that mapkey for you.
If you do this, you will need to rmake sure all of the lines have a \ at the end, except for the last line. The mapkey will stop on the last line that does not have the \
If you are using J-Link to open, only you create a method that reads the values of the notepad and then open.
File file = new File("C:\temp\read.txt");
FileReader fileReader = new FileReader(file);
BufferedReader reader = new BufferedReader(fileReader);
String data = null;
while((data = reader.readLine()) != null){
codigo = data;
}
fileReader.close();
reader.close();
To open Creo do as follows:
//for parts
ModelType mdl_type = ModelType.MDL_PART;
//for assembly
ModelType mdl_type = ModelType.MDL_ASSEMBLY;
ModelDescriptor proeModelDescriptor = pfcModel.ModelDescriptor_Create(mdl_type, codigo, null);
proeModel = session.RetrieveModel(proeModelDescriptor);
proeModel.Display();
I hope I have helped!
Hi
nm-2
It is possible using ProToolKit Customization and it is already developed in our organization.
Please reach us.
All solutions require some programming, building an trail file may be the easiest one .
If you don't want to take the time, try using this script: ---
Jose