
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys,
Im trying get a symbol to insert onto a specifc drawing view in an inventor drawing using ilogic when a rule is run.
I can get the symbol to insert with a prompt which allows the user to select the view, but I want it to insert without the user having to select the view. Is this possible by refering to the View Identifier name in the drawing view properties?
This is my code so far.
My error message is to do with refering to the view. Im not sure how to fix it.
The drawing view i want the symbol to be inserted on is called 'PART PLAN ON MAIN DECK'
Thanks
Sandy
:
Dim oApp As Application: oApp = ThisApplication
Dim oDoc As DrawingDocument: oDoc = oApp.ActiveDocument
Dim oSheet As Sheet: oSheet = oDoc.ActiveSheet
Dim oSymDef As SketchedSymbolDefinition: oSymDef = oDoc.SketchedSymbolDefinitions.Item("Container StarBoard Symbol")
Dim oView As DrawingView
oView = ActiveSheet.View("PART PLAN ON MAIN DECK")
Dim oPosition As Point2d: oPosition = oView.Center
Dim oSymbol As SketchedSymbol: oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition, , ,sPromptStrings)
Solved! Go to Solution.