Message 1 of 2
Inventor Browser / Workplanes or WorkAxis
Not applicable
08-04-2009
05:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
How can i visible the Workplane or Workaxis from a active Part from a Assembly
==> see Printscreen Tuned Pipe
with this Code i can set it to true because i set in the Part not in the corrent View ?
Dim oWorkAxisSwitch As Boolean
Private Sub test()
Dim m_inventorApplication As Inventor.Application
Set m_inventorApplication = ThisApplication
Dim oDoc As Inventor.Document
Set oDoc = m_inventorApplication.ActiveDocument
Dim oEditDoc As Inventor.Document
Set oEditDoc = m_inventorApplication.ActiveEditDocument
Dim oSelect As Inventor.SelectSet
Set oSelect = oEditDoc.SelectSet
'-----------------------------------------------------------------------------------------------------------
Dim oWorkAxisSwitch As Boolean
oWorkAxisSwitch = True
For Each BrowserParentItem In oEditDoc.BrowserPanes.Item(2).TopNode.BrowserNodes
If Not BrowserParentItem.NativeObject Is Nothing Then
If BrowserParentItem.NativeObject.Type = kWorkAxisObject Then 'Like "83891360" Then
BrowserParentItem.NativeObject.Visible = oWorkAxisSwitch
End If
End If
Next
If oWorkAxisSwitch = True Then oWorkAxisSwitch = False: GoTo Ende
If oWorkAxisSwitch = False Then oWorkAxisSwitch = True: GoTo Ende
'-----------------------------------------------------------------------------------------------------------
Ende:
oEditDoc.Update
End Sub
thx for help
Mario
How can i visible the Workplane or Workaxis from a active Part from a Assembly
==> see Printscreen Tuned Pipe
with this Code i can set it to true because i set in the Part not in the corrent View ?
Dim oWorkAxisSwitch As Boolean
Private Sub test()
Dim m_inventorApplication As Inventor.Application
Set m_inventorApplication = ThisApplication
Dim oDoc As Inventor.Document
Set oDoc = m_inventorApplication.ActiveDocument
Dim oEditDoc As Inventor.Document
Set oEditDoc = m_inventorApplication.ActiveEditDocument
Dim oSelect As Inventor.SelectSet
Set oSelect = oEditDoc.SelectSet
'-----------------------------------------------------------------------------------------------------------
Dim oWorkAxisSwitch As Boolean
oWorkAxisSwitch = True
For Each BrowserParentItem In oEditDoc.BrowserPanes.Item(2).TopNode.BrowserNodes
If Not BrowserParentItem.NativeObject Is Nothing Then
If BrowserParentItem.NativeObject.Type = kWorkAxisObject Then 'Like "83891360" Then
BrowserParentItem.NativeObject.Visible = oWorkAxisSwitch
End If
End If
Next
If oWorkAxisSwitch = True Then oWorkAxisSwitch = False: GoTo Ende
If oWorkAxisSwitch = False Then oWorkAxisSwitch = True: GoTo Ende
'-----------------------------------------------------------------------------------------------------------
Ende:
oEditDoc.Update
End Sub
thx for help
Mario