Placing part list tabel over title block

Placing part list tabel over title block

GosponZ
Collaborator Collaborator
570 Views
1 Reply
Message 1 of 2

Placing part list tabel over title block

GosponZ
Collaborator
Collaborator

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)

0 Likes
Accepted solutions (1)
571 Views
1 Reply
Reply (1)
Message 2 of 2

GosponZ
Collaborator
Collaborator
Accepted solution

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)

0 Likes