Here is the code I have, any help would be appreciated even if its only to tell me it can't be done. Inventor 2009 SP2
Public Sub PartListLine()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
' Set the user defined (custom) property set
Dim CustomPropSets As PropertySets
Set CustomPropSets = oDrawDoc.PropertySets
Dim CustomPropSet As PropertySet
Set CustomPropSet = CustomPropSets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
Dim sName As String Dim sValue As String
sName = "PN" sValue = "123456"
Call CustomPropSet.Add(sValue, sName)
'Update the document
oDrawDoc.Update
' Create the new sketched symbol definition.
Dim oSketchedSymbolDef As SketchedSymbolDefinition
Set oSketchedSymbolDef = oDrawDoc.SketchedSymbolDefinitions.Add("Part List")
' Open the sketched symbol definition's sketch for edit. This is done by calling the Edit
' method of the SketchedSymbolDefinition to obtain a DrawingSketch. This actually creates
' a copy of the sketched symbol definition's and opens it for edit.
Dim oSketch As DrawingSketch
Call oSketchedSymbolDef.Edit(oSketch)
Dim oTG As TransientGeometry
Set oTG = ThisApplication.TransientGeometry
' Use the functionality of the sketch to add sketched symbol graphics.
Dim oRectangleLines As SketchEntitiesEnumerator
Set oRectangleLines = oSketch.SketchLines.AddAsTwoPointRectangle(oTG.CreatePoint2d(0, 0), _
oTG.CreatePoint2d(7.375 * 2.54, 0.1875 * 2.54))
Dim oSketchLine1 As SketchLine
Set oSketchLine1 = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(0.375 * 2.54, 0), _
oTG.CreatePoint2d(0.375 * 2.54, 0.1875 * 2.54))
Dim oSketchLine2 As SketchLine
Set oSketchLine2 = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(0.75 * 2.54, 0), _
oTG.CreatePoint2d(0.75 * 2.54, 0.1875 * 2.54))
Dim oSketchLine3 As SketchLine
Set oSketchLine3 = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(1.75 * 2.54, 0), _
oTG.CreatePoint2d(1.75 * 2.54, 0.1875 * 2.54))
Dim oSketchLine4 As SketchLine
Set oSketchLine4 = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(4.75 * 2.54, 0), _
oTG.CreatePoint2d(4.75 * 2.54, 0.1875 * 2.54))
Dim oSketchLine5 As SketchLine
Set oSketchLine5 = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(5.625 * 2.54, 0), _
oTG.CreatePoint2d(5.625 * 2.54, 0.1875 * 2.54))
Dim oSketchLine6 As SketchLine
Set oSketchLine6 = oSketch.SketchLines.AddByTwoPoints(oTG.CreatePoint2d(6.5 * 2.54, 0), _
oTG.CreatePoint2d(6.5 * 2.54, 0.1875 * 2.54))
Dim oPoint As SketchPoint
Set oPoint = oSketch.SketchPoints.Add(oTG.CreatePoint2d(7.375 * 2.54, 0.1875 * 2.54))
' Make the work point of the sketch the insertion point
oPoint.InsertionPoint = True
''''THIS IS WHERE i WANT IT TO INSERT THE CUSTOM DRAWING PROPERTY <PN> INTO THE TEXT BOX
''''ALL I CAN GET IS THE VALUE
'Add custom properties to the sketch symbol.
Dim oTextBox As TextBox
Set oTextBox = oSketch.TextBoxes.AddFitted(oTG.CreatePoint2d((0.375 * 2.54) / 2, (0.1875 * 2.54) / 2), _ CustomPropSets.Item("User Defined Properties").Item("PN").Expression)
oTextBox.VerticalJustification = kAlignTextMiddle
oTextBox.HorizontalJustification = kAlignTextCenter
Call oSketchedSymbolDef.ExitEdit(True)
'Set a reference to the active sheet.
Dim oDrgSheet As Sheet
Set oDrgSheet = oDrawDoc.ActiveSheet
' Set a reference to the sheet's border
Dim oBorder As Border Set oBorder = oDrgSheet.Border
Dim oPlacementPoint As Point2d
If Not oBorder Is Nothing Then
' A border exists. The placement point
' is the top-right corner of the border.
Set oPlacementPoint = oBorder.RangeBox.MaxPoint Else
' There is no border. The placement point
' is the top-right corner of the sheet.
Set oPlacementPoint = ThisApplication.TransientGeometry.CreatePoint2d(oDrawDoc.Width, oDrawDoc.height)
End If
' Add an instance of the sketched symbol definition to the sheet.
' Rotate the instance by 0 degrees and scale by 1 when adding.
' The symbol will be inserted at the upper right corner of the sheet.
Dim oSketchedSymbol As SketchedSymbol
Set oSketchedSymbol = oDrgSheet.SketchedSymbols.Add(oSketchedSymbolDef, oPlacementPoint, (0), 1)
End Sub