Message 1 of 3
Drawing Include Surfaces Command Misbehavior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to include surfaces in a drawing view. If I select a component in the drawing browser and run the code below, I get different results depending on how I select the component. If I right click, then left click on the component, I get the desired behavior (surfaces appear on drawing view). If I simply select the component with a left click, the surfaces aren't included. Most importantly, if I select a browser node with the BrowserNode.DoSelect method, it also fails to include the surfaces. Am I doing something wrong, or is this a bug? This has me at a complete standstill, so any help is greatly appreciated. If this is a bug, is there a way for me to simulate a right click via VBA as a workaround?
Public Sub IncludeSurfaces()
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oCommandMgr As CommandManager
Set oCommandMgr = ThisApplication.CommandManager
Dim oControlDef As ControlDefinition
Set oControlDef = oCommandMgr.ControlDefinitions.Item("DrawingIncludeSurfacesCtxCmd")
Call oControlDef.Execute
End Sub
I'm running 2010 64 bit on XP 64.
Public Sub IncludeSurfaces()
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oCommandMgr As CommandManager
Set oCommandMgr = ThisApplication.CommandManager
Dim oControlDef As ControlDefinition
Set oControlDef = oCommandMgr.ControlDefinitions.Item("DrawingIncludeSurfacesCtxCmd")
Call oControlDef.Execute
End Sub
I'm running 2010 64 bit on XP 64.