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

Opening Multiple files

Highlighted
Regular Member

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
Highlighted

Re: Opening Multiple files

Use VB and VB API to Creo.

Should work.

Highlighted

Re: Opening Multiple files

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 \

Highlighted

Re: Opening Multiple files

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!

Highlighted

Re: Opening Multiple files

Hi
nm-2

It is possible using ProToolKit Customization and it is already developed in our organization.

Please reach us.

Highlighted

Re: Opening Multiple files

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

Announcements
Business Continuity with Creo: Learn more about it here.