Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The rule works fine if a surface is pre-selected. However, Ideally, I need the user (without pre-selecting) to select the face while the rule is running (i.e. rule execution reminds user to select a face).
I tried a lot without success. I request someone help me. Simplified code is shown below. Sample file attached here to!
Imports System.Windows.Forms Dim oFace As Face Dim formatExport As New ArrayList oDxf = ".dxf" oExit = "EXIT" formatExport.add(oDxf) formatExport.add(oExit) oExt = InputListBox("SELECT", formatExport, formatExport(0), Title := "Title", ListName := "List") If oExt = oExit Then Exit Sub If oExt = oDxf Then i = 0 While i = 0 'Select one face only L_oFace: oFace = ThisApplication.CommandManager.Pick(Inventor.SelectionFilterEnum.kPartFaceFilter, "Select face") If IsNothing (oFace) Then Goto L_oFace i += 1 planesSelected = planesSelected _ & vbLf & "FACE " & i & ", SELECTED" MessageBox.Show("Message: " & planesSelected, "Title") End While ' oFace Is Nothing End If nameFolder = ThisDoc.WorkspacePath() & "\" Clipboard.SetText(nameFolder) saveAsFileName = ThisDoc.FileName(False) & oExt oFileName = nameFolder & saveAsFileName MessageBox.Show("saveAsFileName: " & oFileName, "Title") Dim oCmdMgr As CommandManager oCmdMgr = ThisApplication.CommandManager Call oCmdMgr.PostPrivateEvent(PrivateEventTypeEnum.kFileNameEvent, oFileName) Call oCmdMgr.ControlDefinitions.Item("GeomToDXFCommand").Execute
Solved! Go to Solution.