Hi @ssiem. Here is another example iLogic rule you can review and test with. One of the complicated things about that task is that we do not know which corner of your PartsList you have set as the 'insertion point' (where your mouse pointer is in relation to the PartsList when placing it manually. That would tell us where within the area of the PartsList the PartsList.Position property is referring to. I can see from your image examples that you want the lower right corner of the PartsList to be placed at the upper right corner of the TitleBlock on the sheet. So I included some extra code in there to help overcome some of the unknown variables involve in this situation. This code will attempt to iterate through every sheet in your drawing, and if the sheet does not already have a PartsList present, it will attempt to add one, the reposition it where you want it to be. If the sheet already has a PartsList, or the sheet does not have any views, or the sheet does not have a TitleBlock present, it will skip to the next sheet.
Sub Main
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then Exit Sub
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheets As Inventor.Sheets = oDDoc.Sheets
Dim oASheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim oTrans As Transaction = ThisApplication.TransactionManager.StartTransaction(oDDoc, "Add PartsLists - iLogic")
For Each oSheet As Inventor.Sheet In oSheets
oSheet.Activate
If oSheet.PartsLists.Count > 0 Then Continue For
If oSheet.DrawingViews.Count = 0 Then Continue For
If oSheet.TitleBlock Is Nothing Then Continue For
Dim oView As DrawingView = oSheet.DrawingViews.Item(1)
Dim oTBPos As Point2d = oSheet.TitleBlock.RangeBox.MaxPoint
Dim oInsPt As Point2d = oTG.CreatePoint2d(oSheet.Width / 2, oSheet.Height / 2)
Dim oPList As PartsList = oSheet.PartsLists.Add(oView, oInsPt)
oDDoc.Update
Dim oPL_Corner As Point2d = oTG.CreatePoint2d(oPList.RangeBox.MaxPoint.X, oPList.RangeBox.MinPoint.Y)
Dim oPLPos As Point2d = oPList.Position.Copy
oPLPos.TranslateBy(oPL_Corner.VectorTo(oTBPos))
oPList.Position = oPLPos
Next
oASheet.Activate
oTrans.End
oDDoc.Update2(True)
End Sub
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)