Well its an assembly file with only 1 part file in it. The goal is to duplicate that part & replace the text every iteration based off of an excel chart. I have all of that works just fine, I'm trying to add the ability to control the stretch of the text based off of the string length.
This works code works just fine for what I'm trying to do. Just trying to add the ability to control stretch now. When i try to access PlanarSketch via part document i get an error & same with assembly document. I'm just not sure why i cant access it via part document, it should be there, maybe my syntax is wrong

Sub main
' MakeParameters
SetParameters
CopyPipes
RuleParametersOutput()
iLogicVb.DocumentUpdate()
End Sub
Sub MakeParameters
oMyParameter=ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters
'Setting an userParameter as text parameter
oParameter=oMyParameter.AddByValue("FileLocation", "", UnitsTypeEnum.kTextUnits)
End Sub
Sub SetParameters
'Promt the user for the value of a variable
Input1 = InputBox("FileLocation", "FileLocation: ", "")
'assign the value of that variable to user parameter
Parameter.UpdateAfterChange = True
Parameter("FileLocation") = ""
Parameter.UpdateAfterChange = True
Parameter("FileLocation") = Input1
End Sub
Private Sub CopyPipes()
Dim oPart = Component.InventorComponent("OrginalPart:1")
Dim oPartDoc As PartDocument = oPart.Definition.Document
Dim oPath As String = ThisDoc.Path
GoExcel.Open(FileLocation, "Sheet1")
Dim i As Integer = 0
'index Row 2 through 1000
For rowPN = 3 To 1000
'find first empty cell in column A
If GoExcel.CellValue("P:\MCI-METAL RACK\SHEET METAL RACK LABELS.xlsx", "Sheet1", "A1") = "" Then
'create a variable for the cell value that is one row less than the empty cell row
lastPN = GoExcel.CellValue("P:\MCI-METAL RACK\SHEET METAL RACK LABELS.xlsx", "Sheet1", "A" & rowPN - 1)
If lastPN = "" Then
Exit For
End If
End If
Parameter("OrginalPart:1", "Text") = lastPN
oPartDoc.SaveAs("P:\MCI-METAL RACK\Parts" & "/" & lastPN & ".ipt", True)
Next
End Sub