Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Placing part list tabel over title block

1 REPLY 1
SOLVED
Reply
Message 1 of 2
GosponZ
492 Views, 1 Reply

Placing part list tabel over title block

Can you guys help me to fix this code. In multi sheet this code is working with little problem. It won't stick to the border. It just stick to the sheet size on the right. Place would be good if right side stick to the border. Table sit on the top of title block which is what i want.

Apreciate for help.

Format:HTML Format
Version:1.0
StartHTML: 165
EndHTML: 12500
StartFragment: 314
EndFragment: 12468
StartSelection: 314
EndSelection: 314

SyntaxEditor Code Snippet

' add partslist table

oDrawDoc=ThisDoc.Document
'Set a reference to the active sheet.
DimoSheetAsSheet
oSheet=oDrawDoc.ActiveSheet

' Set a reference to the first drawing view


DimoDrawingViewAsDrawingView
oDrawingView=oSheet.DrawingViews(1)


oPlacementPoint=ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Width, oSheet.Height)

' Create the parts list.
DimoPartsListAsPartsList
oPartsList=oSheet.PartsLists.Add(oDrawingView, oPlacementPoint)



minXpoint=oSheet.TitleBlock.RangeBox.MinPoint.x
minYpoint=oSheet.TitleBlock.RangeBox.MaxPoint.Y
maxXpoint=oPlacementPoint.x
dPointx=oSheet.PartsLists.Item(1).RangeBox.MinPoint.X-minXpoint
dPointY=oSheet.PartsLists.Item(1).RangeBox.MinPoint.Y-minYpoint
maxYpoint=oPlacementPoint.Y-dPointY

Dimnewmin, newmaxAsPoint2d
newmin=ThisApplication.TransientGeometry.CreatePoint2d(minXpoint, minYpoint)
newmax=ThisApplication.TransientGeometry.CreatePoint2d(maxXpoint, maxYpoint)
oSheet.PartsLists.Item(1).Delete
oPartsList=oSheet.PartsLists.Add(oDrawingView, newmax)

1 REPLY 1
Message 2 of 2
GosponZ
in reply to: GosponZ

Just fixed :). Working good now in multi sheets place part list table on top of title block. Lower rh corner

' add partslist table

oDrawDoc=ThisDoc.Document
'Set a reference to the active sheet.
DimoSheetAsSheet
oSheet=oDrawDoc.ActiveSheet
DimoBorderAsBorder=oSheet.Border
' Set a reference to the first drawing view


DimoDrawingViewAsDrawingView
oDrawingView=oSheet.DrawingViews(1)

IfNotoBorderIsNothingThen
oPlacementPoint=oBorder.RangeBox.MaxPoint
Else
oPlacementPoint=ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Width, oSheet.Height)
EndIf




' Create the parts list.
DimoPartsListAsPartsList
oPartsList=oSheet.PartsLists.Add(oDrawingView, oPlacementPoint)



minXpoint=oSheet.TitleBlock.RangeBox.MinPoint.x
minYpoint=oSheet.TitleBlock.RangeBox.MaxPoint.Y
maxXpoint=oPlacementPoint.x
dPointx=oSheet.PartsLists.Item(1).RangeBox.MinPoint.X-minXpoint
dPointY=oSheet.PartsLists.Item(1).RangeBox.MinPoint.Y-minYpoint
maxYpoint=oPlacementPoint.Y-dPointY

Dimnewmin, newmaxAsPoint2d
newmin=ThisApplication.TransientGeometry.CreatePoint2d(minXpoint, minYpoint)
newmax=ThisApplication.TransientGeometry.CreatePoint2d(maxXpoint, maxYpoint)
oSheet.PartsLists.Item(1).Delete
oPartsList=oSheet.PartsLists.Add(oDrawingView, newmax)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report