When you generate a saved output file using automatic indexing with the Edit window PRINT/AUTO command, PC-DMIS uses an index value as a base. It then it increments the index if there's a duplicate file name in the same directory so that you end up with a unique file name.
This property lets you get or set the index value stored in the part program.
Visual Basic |
---|
Public Property OutputFileIndex As Long |
Long value showing the file's index value.
This example gets the saved index value stored in the part program and places it in a saveIndex variable. The code then sets the index value to a new value of newIndex. Finally, it restores the index to the original saveIndex value.
Example (Visual Basic) | Copy Code |
---|---|
activePartProgram = App.ActivepartProgram dim saveIndex as Integer saveIndex = activePartProgram.OutputFileIndex activePartProgram.OutputFileIndex = newIndex .... .... activePartProgram.OutputFileIndex = saveIndex |