Community
My company structures a parts list on detail drawings a certain way.
I need to edit the parts list actual table grid layout.
Please see attached.
Is this something that can be accomplished?
Hi,
I don't see an easy way of doing it.
If you want to blank out some of the table lines from printing then that should be possible by drawing a white sketch line in front of it. This code blanks out the top line of the cell in the 2nd row and 3rd column:
Public Sub GetCellTopLinePoints(pl As PartsList, row As Integer, col As Integer, ByRef sp As Point2d, ByRef ep As Point2d) Set sp = pl.Position.Copy() Set ep = pl.Position.Copy() Dim i As Integer For i = col To pl.PartsListColumns.Count ep.x = ep.x - pl.PartsListColumns(i).Width Next sp.x = ep.x + pl.PartsListColumns(col).Width For i = 1 To row - 1 ep.Y = ep.Y - pl.PartsListRows(i).Height Next sp.Y = ep.Y End Sub Public Sub PartsListTest() Dim dwg As DrawingDocument Set dwg = ThisApplication.ActiveDocument ' Select the parts list first Dim pl As PartsList Set pl = dwg.SelectSet(1) Dim sp As Point2d Dim ep As Point2d Call GetCellTopLinePoints(pl, 2, 3, sp, ep) On Error Resume Next ' Let's keep refreshing the same sketch Dim ds As DrawingSketch Set ds = dwg.ActiveSheet.Sketches("PartsList") If Not ds Is Nothing Then ds.Delete End If On Error GoTo 0 Set ds = dwg.ActiveSheet.Sketches.Add() ds.Name = "PartsList" Set sp = ds.SheetToSketchSpace(sp) Set ep = ds.SheetToSketchSpace(ep) ds.Edit Dim sl As SketchLine Set sl = ds.SketchLines.AddByTwoPoints(sp, ep) Dim tr As TransientObjects Set tr = ThisApplication.TransientObjects sl.OverrideColor = tr.CreateColor(255, 255, 255) ds.ExitEdit End Sub
I hope this helps.
Cheers,