Drawing Include Surfaces Command Misbehavior

Drawing Include Surfaces Command Misbehavior

alewer
Advocate Advocate
357 Views
2 Replies
Message 1 of 3

Drawing Include Surfaces Command Misbehavior

alewer
Advocate
Advocate
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.
0 Likes
358 Views
2 Replies
Replies (2)
Message 2 of 3

alewer
Advocate
Advocate
I have given up on getting surfaces and am now getting sketches (DrawingGetModelSketchesCtxCmd) rather than including surfaces (DrawingIncludeSurfacesCtxCmd). Fortunately, this workaround works for this particular application, but I am convinced that there is a bug with the include surfaces command.
0 Likes
Message 3 of 3

Anonymous
Not applicable

Did you ever finalize the Include Surfaces code?

 

I'm looking at something to Include Surfaces for all parts in all views on a drawing.

 

Thanks,

Randy

0 Likes