sketch Symbol - Attached to
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey
When i add a sketch Symbol manually to my drawing over a drawing view, it stays attached to the drawing view if i move it. If i do the exact the same in code by placing the Sketch Symbol to the mouse pointer and placing it in the same position, it doesnt. When i place the Sketch Symbol at a predetermined point over the drawing view, it doesnt attach either. How can i get it to attach to the drawing view so that when the view is moved, thew Sketch Symbol also moves?
Code to attach
Dim doc As DrawingDocument
Set doc = ThisApplication.ActiveDocument
Dim modelPane As BrowserPane
Set modelPane = doc.BrowserPanes.Item("DlHierarchy")
Dim recources As BrowserNode
Set recources = modelPane.TopNode.BrowserNodes.Item("Drawing Resources")
Dim symbols As BrowserNode
Set symbols = recources.BrowserNodes.Item("Sketch Symbols")
' Replace "MySketchedSymbol" with the name of the sketched symbol name that you want to place.
Dim mySketchedSymbol As BrowserNode
Set mySketchedSymbol = symbols.BrowserNodes.Item("MySketchSymbol")
mySketchedSymbol.DoSelect
Dim cd As ControlDefinition
Set cd = ThisApplication.CommandManager.ControlDefinitions.Item("DrawingSketchSymbolInsertCtxCmd")
cd.Execute
Manual Add Sketch Symbol - moves with drawing view
Code add Sketch Symbol - doesnt move with drawing view
Thanks
Nacho
Automation & Design Engineer
Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.