Hello,
Is there is a code that you have a can use, so you can click where something has to be, instead of using coordinates? (something like revision table/Parts list etc).
Solved! Go to Solution.
Solved by A.Acheson. Go to Solution.
It could be done but would be a more complex process and perhaps unecessary for the user. Is the table not against a border of some kind? You can detect the borders of a sheet, work out the table size if the placement point isnt against a border then then just move the table against the border. Here is a post with a postion sub routine.
Well that is maybe even better, is it hard to put in a corner every time automatically?
F.e.:
A0_landscape top right
A1_Portrait top right?
If you look for the position sub routine in the precious link you will see border.RangeBox.MaxPoint.X which is the right hand side border and Y the top right hand corner.
For the partslist all you need is this point. If you place it in a sub like the rev table you can call it when you change orientation.
oTablePt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Border.RangeBox.MaxPoint.X, oSheet.TitleBlock.RangeBox.MaxPoint.Y)
This sub is set up for the rev table on right hand bottom corner.
Private Sub Positiontable( oTablePt As Point2d,oSheet As Sheet) Dim oRevTableItem As RevisionTable oRevTableItem = oSheet.RevisionTables.Item(1) Dim oWidthRevTable As Double oWidthRevTable = oRevTableItem.RangeBox.MaxPoint.X - oRevTableItem.RangeBox.MinPoint.X Dim oHeightRevTable As Double oHeightRevTable = oRevTableItem.RangeBox.MaxPoint.Y - oRevTableItem.RangeBox.MinPoint.Y oTablePt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Border.RangeBox.MaxPoint.X - oWidthRevTable, oSheet.TitleBlock.RangeBox.MaxPoint.Y + oHeightRevTable) oRevTableItem.Position = oTablePt End Sub
Can't find what you're looking for? Ask the community or share your knowledge.