hexagon logo

Tracefields and Scripts

Anyone out there know how to retrieve a Tracefield Value from a part program in a script? Can't quite find the right command...
Parents
  • A couple of thoughts.

    1) For "strPath=" you are using \\ for folder delimiter and for "strFldrName=" you are using \ - I think the single slash is correct.

    2) The path must be created step by step - for instance, if I want to create "C:\F1\F2\", F2 can't be created if F1 doesn't exist.

    3) If string content in any of the variables you are using contain these characters " \ / : * ? " < > | " you will get an error since they are invalid for file names.


    So, I believe that in order to use "out-of-process" objects, you'd need to code them differently (look in the PC-DMIS basic helpfile), or code the script as a VBS-script and call that from within PC-DMIS.


    We have many scripts that use FileSystemObject - I've never had to do anything out of the ordinary. I don't understand why your pc-dmis example above errored out.Confused
Reply
  • A couple of thoughts.

    1) For "strPath=" you are using \\ for folder delimiter and for "strFldrName=" you are using \ - I think the single slash is correct.

    2) The path must be created step by step - for instance, if I want to create "C:\F1\F2\", F2 can't be created if F1 doesn't exist.

    3) If string content in any of the variables you are using contain these characters " \ / : * ? " < > | " you will get an error since they are invalid for file names.


    So, I believe that in order to use "out-of-process" objects, you'd need to code them differently (look in the PC-DMIS basic helpfile), or code the script as a VBS-script and call that from within PC-DMIS.


    We have many scripts that use FileSystemObject - I've never had to do anything out of the ordinary. I don't understand why your pc-dmis example above errored out.Confused
Children
No Data