How to use DrawingGetModelSketchesCtxCmd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Goal: get model sketches for each drawing view.
I'm trying to use a combination of this...
DrawingView.ReferencedDocumentDescriptor Property
Parent Object: DrawingView
Description
Property that returns the model document referenced by this view.
Syntax
DrawingView.ReferencedDocumentDescriptor() As DocumentDescriptor
Property Value
This is a read only property whose value is a DocumentDescriptor.
...Combined with this...
BrowserPane.GetBrowserNodeFromObject Method
Parent Object: BrowserPane
Description
Returns the browser node that corresponds to the input object. The method returns an error if no corresponding node is found within this pane. If multiple matches are found, the method returns the first match.
Syntax
BrowserPane.GetBrowserNodeFromObject( NativeObject As Object ) As BrowserNode
...and adding each node for each view to a selection set before running the command:
DrawingGetModelSketchesCtxCmd
I've so far been unsuccessful and getting desperate. I also tried this...
DrawingView.SetIncludeStatus Method
Parent Object: DrawingView
Description
Method that sets the include status of the input object in the drawing view. This method automatically makes the object visible as well. After an object has been included, its visibility can be controlled using the GetVisibility and SetVisibility methods.
Syntax
DrawingView.SetIncludeStatus( Object As Object, Include As Boolean )
Parameters
Name Type Description
Object Object Input object to set the include status of. Valid objects are 2d and 3d sketches, work features, surface features, and proxies for all of these. The object needs to be supplied in the context of the document referenced by the drawing view. For instance, to set the include status of a 3D sketch within a part instanced in an assembly (and the drawing view is of the assembly), the input should be a Sketch3DProxy object created in context of the assembly. An error will occur if no corresponding object exists in the drawing view.
Include Boolean Input Boolean that specifies whether the input object is included in the drawing view.
But I was also unsuccessful this way. Can anybody tell me what I might be doing wrong, and suggest a snippet of code that would help me target the browser nodes for all models from all drawing views on the active sheet of the active document and get the model sketches?
Thank you so much.