Private Sub Command1_Click()
Dim app As New PCDLRN.Application
Dim partprogram As PCDLRN.partprogram
Dim cmd As Command
Set partprogram = app.ActivePartProgram
For I = 1 To partprogram.Commands.Count
Set cmd = partprogram.Commands.Item(I)
'cmd.Type = MEASURED_PLANE
List1.AddItem "ID=" & cmd.ID & "; type=" & cmd.Type
Next I