cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Opening Multiple files

NitMad
7-Bedrock

Opening Multiple files

Hi, i would like to know how to open multiple files by copying the file names from an excel or notepad?

5 REPLIES 5
Eike_Hauptmann
13-Aquamarine
(To:NitMad)

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.

Jose_Costa
6-Contributor
(To:NitMad)

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

Top Tags