Isometric BOM Cell Height too Large

Isometric BOM Cell Height too Large

Anonymous
Not applicable
1,331 Views
5 Replies
Message 1 of 6

Isometric BOM Cell Height too Large

Anonymous
Not applicable

Hello,

 

I was wondering if anyone knows why the BOM cell height stays at a certain length once reached. I.e. after the extremely large, Long Description of the Olets you see below, the rest of the Long Descriptions use the same cell height, instead of decreasing back to the minimal. Not only is it hideous, but it's causing 2 sheets of BOM for 1 sheet of drawing. Anyone know what to do here? Any help is greatly appreciated.

 

Thanks,

Rob.

 

 

Capture.PNG

0 Likes
Accepted solutions (1)
1,332 Views
5 Replies
Replies (5)
Message 2 of 6

h_eger
Mentor
Mentor

Dear @Anonymous

 

please version of Plant 3D etc. !!!!

-

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



0 Likes
Message 3 of 6

Anonymous
Not applicable

Plant 3D 2017. Created my own ISO style using Ansi C Final* template. 

0 Likes
Message 4 of 6

jabowabo
Mentor
Mentor

Unfortunately, once a row height gets expanded, all subsequent row heights get expanded the same whether they need it or not. This appears to be hard-coded so I don't think there is any way around it. We use a clean up routine (C#) to fix these types of issues after Iso's are dropped. Here's the function I use for fixing tables - it compresses the row heights and optimizes the table positioning.

 

        private static void RepositionIsoTables(Point3d firstTableInsertionPt)
        {
            Document doc = MiscTools.GetActiveDoc(); if (doc == null) return;
            Editor ed = doc.Editor;
            Database db = doc.Database;

            // Set focus on drawing area
            Autodesk.AutoCAD.Internal.Utils.SetFocusToDwgView();

            // find shop, field, and spool tables
            TypedValue[] tvArray = new TypedValue[1];
            tvArray.SetValue(new TypedValue((int)DxfCode.Start, "ACAD_TABLE"), 0);
            ObjectIdCollection idColl = MiscTools.GetObjIdColl(ref ed, true, tvArray);

            // compress row heights
            using (DocumentLock docLock = doc.LockDocument())
            {
                using (Transaction tr = db.TransactionManager.StartTransaction())
                {
                    foreach (ObjectId id in idColl)
                    {
                        Table currTable = tr.GetObject(id, OpenMode.ForRead) as Table;
                        
                        // make sure the table is shop or field table
                        string tableTitle = currTable.Cells[0, 0].TextString;
                        if (tableTitle.StartsWith("SHOP") || tableTitle.StartsWith("FIELD") || tableTitle.StartsWith("SPOOL"))
                        {
                            currTable.UpgradeOpen();
                            int rowCount = currTable.Rows.Count;

                            // delete shop/field table if it does not contain enough rows
                            if (tableTitle.StartsWith("SHOP") || tableTitle.StartsWith("FIELD"))
                            {
                                if (rowCount < 3)
                                {
                                    currTable.Erase();
                                    continue;
                                }
                            }

                            for (int i = 0; i < rowCount; i++)
                            {
                                try
                                {
                                    // compress the row height if possible
                                    currTable.Rows[i].Height = 0.15360000;
                                }
                                catch
                                {
                                    ed.WriteMessage("\nWarning: Could not compress row height.");
                                }
                            }
                            currTable.DowngradeOpen();
                        }
                    }
                    tr.Commit();
                }// end tr
            }// end doclock

            // re-position tables
            Table shopTable = null;
            Table fieldTable = null;
            Table spoolTable = null;

            tvArray = new TypedValue[1];
            tvArray.SetValue(new TypedValue((int)DxfCode.Start, "ACAD_TABLE"), 0);
            idColl = MiscTools.GetObjIdColl(ref ed, true, tvArray);

            Point3d nextPos = firstTableInsertionPt;
            using (DocumentLock docLock = doc.LockDocument())
            {
                using (Transaction tr = db.TransactionManager.StartTransaction())
                {
                    foreach (ObjectId id in idColl)
                    {
                        // get the standard table types
                        Table currTable = tr.GetObject(id, OpenMode.ForRead) as Table;
                        string tableTitle = currTable.Cells[0, 0].TextString;
                        if (tableTitle.StartsWith("SHOP"))
                            shopTable = currTable;
                        if (tableTitle.StartsWith("FIELD"))
                            fieldTable = currTable;
                        if (tableTitle.StartsWith("SPOOL"))
                            spoolTable = currTable;
                    }

                    try
                    {
                        shopTable.UpgradeOpen();
                        shopTable.Position = nextPos;
                        nextPos = new Point3d(nextPos.X, nextPos.Y - shopTable.Height - .075, nextPos.Z);
                    }
                    catch
                    {
                        //ed.WriteMessage("\nCould not reposition shopTable");
                    }
                    try
                    {
                        fieldTable.UpgradeOpen();
                        fieldTable.Position = nextPos;
                        nextPos = new Point3d(nextPos.X, nextPos.Y - fieldTable.Height - .075, nextPos.Z);
                    }
                    catch
                    {
                        //ed.WriteMessage("\nCould not reposition fieldTable");
                    }
                    try
                    {
                        spoolTable.UpgradeOpen();
                        spoolTable.Position = nextPos;
                    }
                    catch
                    {
                        //ed.WriteMessage("\nCould not reposition spoolTable");
                    }

                    tr.Commit();
                }// end tr
            }// end doclock
        }
Message 5 of 6

Anonymous
Not applicable

Thanks jabowabo. That sounds like a great idea, the only problem is, it still generates two drawings instead of 1 because of that BOM. 

 

I did however come up with something that may help keep the drawings to a minimum. I was thinking to put the Olets at the back of the BOM. Any clue how to do that? I know how to do it when running a Report. I'd call it a fair trade for the 'solution' if you can give me that answer. 

0 Likes
Message 6 of 6

jabowabo
Mentor
Mentor
Accepted solution

My first post was more of an answer than a solution.

 

You can modify the BOM order by changing the 'Groups' order in the AggregatedList area in the isoconfig.xml file. If you have Shop and Field tables, you need to modify in each corresponding AggregatedList. In the sample below, you would move the 'Olets' group to the bottom (after 'Instruments'):

 

      <AggregatedList xsi:type="IsoCompositeDataListConfig" Name="ShopMaterials">
        <RowFilter Filter="KpShopItem" />
        <Index Name="PartNumber" Format="" Characters="" ModelSpecified="false" ContinuousIndexing="false" />
        <Groups>
          <Group Name="PIPE" UseAlternateUnitsStyle="true">
            <RowFilter Filter="Pipe" />
            <Labels>
              <Label Name="pipe" />
            </Labels>
            <Columns>
              <Column Name="Category" />
              <Column Name="Code" />
              <Column Name="Description" />
            </Columns>
            <Sort SortBy="ConnectionSize ASC,Type ASC" />
            <Precisions />
          </Group>
          <Group Name="FITTINGS">
            <RowFilter Filter="KpBomFitting" />
            <Labels>
              <Label Name="fittings" />
            </Labels>
            <Columns>
              <Column Name="Category" />
              <Column Name="Code" />
              <Column Name="Description" />
            </Columns>
            <Sort SortBy="ConnectionSize ASC,Type ASC" />
            <Precisions />
          </Group>
          <Group Name="OLETS">
            <RowFilter Filter="Olet" />
            <Labels>
              <Label Name="olets" />
            </Labels>
            <Columns>
              <Column Name="Category" />
              <Column Name="Code" />
              <Column Name="Description" />
            </Columns>
            <Sort SortBy="ConnectionSize ASC,Type ASC" />
            <Precisions />
          </Group>
          <Group Name="FLANGES">
            <RowFilter Filter="Flange" />
            <Labels>
              <Label Name="flanges" />
            </Labels>
            <Columns>
              <Column Name="Category" />
              <Column Name="Code" />
              <Column Name="Description" />
            </Columns>
            <Sort SortBy="ConnectionSize ASC,Type ASC" />
            <Precisions />
          </Group>
          <Group Name="FASTENERS">
            <RowFilter Filter="Fastener" />
            <Labels>
              <Label Name="fasteners" />
            </Labels>
            <Columns>
              <Column Name="Category" />
              <Column Name="Code" />
              <Column Name="Description" />
              <Column Name="Size" />
            </Columns>
            <Sort SortBy="ConnectionSize ASC,Type ASC" />
            <Precisions />
          </Group>
          <Group Name="VALVES">
            <RowFilter Filter="KpBomValve" />
            <Labels>
              <Label Name="valves" />
            </Labels>
            <Columns>
              <Column Name="Category" />
              <Column Name="Code" />
              <Column Name="Description" />
            </Columns>
            <Sort SortBy="ConnectionSize ASC,Type ASC" />
            <Precisions />
          </Group>
          <Group Name="PIPE SUPPORTS">
            <RowFilter Filter="Support" />
            <Labels>
              <Label Name="pipe supports" />
            </Labels>
            <Columns>
              <Column Name="Category" />
              <Column Name="Code" />
              <Column Name="Description" />
            </Columns>
            <Sort SortBy="ConnectionSize ASC,Type ASC" />
            <Precisions />
          </Group>
          <Group Name="INSTRUMENTS">
            <RowFilter Filter="Instrument" />
            <Labels>
              <Label Name="instruments" />
            </Labels>
            <Columns>
              <Column Name="Category" />
              <Column Name="Code" />
              <Column Name="Description" />
            </Columns>
            <Sort SortBy="ConnectionSize ASC,Type ASC" />
            <Precisions />
          </Group>
        </Groups>
      </AggregatedList>
0 Likes