This behaves the same as the OpenEx method, except that you can define what CAD file to load.
Visual Basic |
---|
Public Function OpenRoutineEx( _ ByVal FileName As String, _ ByVal CadFileName As String, _ ByVal MachineName As String, _ ByRef out_StatusCode As OpenRoutineStatus _ ) As PartProgram |
- FileName
- Required String. This is the file name of the PartProgram to open.
- CadFileName
- Required String. This is the pathway to the CAD file (.cad) to open.
If this is null or PC-DMIS can't find the CAD file, PC-DMIS instead loads the CAD file for the routine. This is the CAD file that has the same name as the routine. This behaves as if you used the OpenEx method with IncludeCAD to True.
- MachineName
- Required String. This is the identifying string for your machine. If you're running in offline mode, use "Offline". If you're running in online mode use "CMM1".
- out_StatusCode
out_StatusCode lets you see the status of the OpenRoutineEx operation.Value Description BranchMismatchError PC-DMIS cannot open the routine due to a branch mismatch error. This has a value of 8. CannotOpenRoutineFile PC-DMIS cannot open the routine. This status has a value of 4. DeserializationError PC-DMIS cannot open the routine because of a deserialization error. This has a value of 7. ErrorClosingRoutineFile PC-DMIS cannot open the routine because it cannot close the routine after it reads it. This has a value of 5. InternalError PC-DMIS cannot open the routine because of an internal error. This has a value of 3. OpenedBackupCopy PC-DMIS opened a backup copy of the routine instead of the main routine. This has a value of 2. PcdmisIsOpeningAnotherRoutine PC-DMIS cannot open the routine because it is in the process of opening another routine. This has a value of 10. RoutineFileDoesNotExist PC-DMIS cannot open the routine because the routine file does not exist. This has a value of 6. RoutineIsNewerError PC-DMIS cannot open the routine because the routine is newer than the version of PC-DMIS. This has a value of 9. RoutineOpened PC-DMIS opened the routine without any errors. This has a value of 1. UnknownStatus PC-DMIS cannot open the routine due to an unknown cause. This has a value of 0.