16,555
社区成员
发帖
与我相关
我的任务
分享
Dim app As PCDLRN.Application
Dim cmds As PCDLRN.Commands
Dim cmd As PCDLRN.Command
Dim part As PCDLRN.PartProgram
app = CreateObject("PCDLRN.Application")
part = app.ActivePartProgram
cmds = part.Commands
For Each cmd In cmds
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pcapp As PCDLRN.Application
Dim pcpart As PCDLRN.PartProgram
Dim pccmds As PCDLRN.Commands
Dim pccmd As PCDLRN.Command
pcapp = CreateObject("pcdlrn.application")
pcpart = pcapp.ActivePartProgram
pccmds = pcpart.Commands
For ii = 1 To pccmds.Count
pccmd = pccmds.Item(ii)
If pccmd.IsDimension Then
If pccmd.Type = PCDLRN.OBTYPE.DIMENSION_START_LOCATION Then
ListBox1.Items.Add(pccmd.GetText(PCDLRN.ENUM_FIELD_TYPES.REF_ID, 1))
End If
End If
Next
End Sub