Skip to main content
10-Marble
July 3, 2015
Question

Opening Multiple files

  • July 3, 2015
  • 4 replies
  • 3552 views

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

    4 replies

    15-Moonstone
    July 6, 2015

    Use VB and VB API to Creo.

    Should work.

    Chris3
    21-Topaz I
    July 6, 2015

    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 \

    1-Visitor
    July 8, 2015

    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!

    1-Visitor
    July 14, 2015

    Hi
    nm-2

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

    Please reach us.

    12-Amethyst
    July 14, 2015

    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