Dim app As PCDLRN.Application
Dim cmds As Object
Dim cmd As PCDLRN.Command
Dim part As PCDLRN.PartProgram
Dim data As PCDLRN.ReportData
Dim rWin As PCDLRN.ReportWindow
Dim nCommands As String = part.Commands.Count.ToString
Dim val As String = part.GetVariableValue("PLN1").StringValue.ToString
MessageBox.Show("Value is -- " & val & "--" & nCommands)
For Each cmd In cmds
'Dim assignName As Object = cmd.GetText(PCDLRN.ENUM_FIELD_TYPES.DEST_EXPR, 0)
'Console.WriteLine(assignName.ToString)
Console.WriteLine(cmd.TypeDescription.ToString & " " & cmd.Type & " " & cmd.GetFieldValue())
'Console.WriteLine(part.GetVariableValue(assignName).CommandValue.ToString)
Next
'rWin = part.ReportWindow
'data = rWin.Pages
'Dim dat As String = data.GetValue(PCDLRN.ENUM_FIELD_TYPES.AXIS_NOMINAL, 1107)
'MessageBox.Show(dat)
and above is the VB.NET code I am using to access CMM code. I want to get all the values inside ASSIGN/x=y commands eg: ASSIGN/V113=V52+","+V53+","+V54. Can anyone share code to get these values ? I am trying to use Command.GetFieldValue(PCDLRN ENUM FIELD TYPE, TYPE INDEX ) , I do not understand what are these two parameters inside the GetFieldValue method ? Any help will be appreciated.
How to track if a partprogram is closed through vb.net, I have wriiten a vb.net program where all the pcdmis program file is accessed and executed through the vb.net program itself. Hence if operator accidentally closes an active partprogram making another open partprogram active. We want to prevent an operator accidentally executing a wrong partprogram.
An idea is to track which partprograms are currently open and check which ones are closed. and to compare which program is active and which is not ?
I saw few IApplication events such as OnPartprogramClose , I am not too sure how to use it
How to track if a partprogram is closed through vb.net, I have wriiten a vb.net program where all the pcdmis program file is accessed and executed through the vb.net program itself. Hence if operator accidentally closes an active partprogram making another open partprogram active. We want to prevent an operator accidentally executing a wrong partprogram.
An idea is to track which partprograms are currently open and check which ones are closed. and to compare which program is active and which is not ?
I saw few IApplication events such as OnPartprogramClose , I am not too sure how to use it