Symbol Insertion point

Symbol Insertion point

Ktomberlin
Advocate Advocate
728 Views
3 Replies
Message 1 of 4

Symbol Insertion point

Ktomberlin
Advocate
Advocate

Just trying to add an existing symbol to a drawing sheet.  I know i'm not formating the point correctly and i get a position error.  How can i get the point location of two intersecting lines in my border to hard code the location? 

 

Error:

 

Error on Line 18 : Argument not specified for parameter 'Position' of 'Public Function Add(SketchedSymbolDefinition As Object, Position As Inventor.Point2d, [Rotation As Double = 0.0], [Scale As Double = 1.0], [PromptStrings As Object]) As Inventor.SketchedSymbol'.

Error on Line 18 : End of statement expected.

DimoApp As Inventor.Application=ThisApplication
DimthisIDW As DrawingDocument=oApp.ActiveDocument
oSheet=thisIDW.ActiveSheet
DimoSymDef As SketchedSymbolDefinition
oSymDef=thisIDW.SketchedSymbolDefinitions.Item("APPROVAL STAMP")myPoint=ThisApplication.TransientGeometry.CreatePoint2d(1, 6)
oSheet.SketchedSymbols.Add(oSymDef) ,myPoint

Thanks

0 Likes
Accepted solutions (1)
729 Views
3 Replies
Replies (3)
Message 2 of 4

jdkriek
Advisor
Advisor
Accepted solution

Here you go, little clean up, and it works now 😉

 

Should be oSheet.SketchedSymbols.Add(oSymDef, myPoint)

 

Dim oApp As Inventor.Application = ThisApplication
Dim thisIDW As DrawingDocument = oApp.ActiveDocument
Dim oSheet As Sheet = thisIDW.ActiveSheet
Dim oSymDef As SketchedSymbolDefinition = thisIDW.SketchedSymbolDefinitions.Item("APPROVAL STAMP")
Dim myPoint As Point2d = oApp.TransientGeometry.CreatePoint2d(1, 6)
Dim oSymbol As SketchedSymbol = oSheet.SketchedSymbols.Add(oSymDef, myPoint)
Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 4

Ktomberlin
Advocate
Advocate

Thank you.  Silly coding error now that i see it. 

 

0 Likes
Message 4 of 4

jdkriek
Advisor
Advisor

You're welcome 😉

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


0 Likes