Skip to main content
10-Marble
Jul 3, 2015 2:03 PM UTC
Question

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

    15-Moonstone
    Jul 6, 2015 9:24 AM UTC

    Use VB and VB API to Creo.

    Should work.

    Translate
    Chris3
    21-Topaz I
    Jul 6, 2015 11:38 AM UTC

    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 \

    Translate
    1-Visitor
    Jul 8, 2015 7:00 PM UTC

    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!

    Translate
    1-Visitor
    Jul 14, 2015 8:46 AM UTC

    Hi
    nm-2

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

    Please reach us.

    Translate
    12-Amethyst
    Jul 14, 2015 8:51 PM UTC

    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

    Translate