cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Modeling BOM table customization

lfortner
11-Garnet

Modeling BOM table customization

How can I customize the Modeling BOM table, displayed with Modeling BOM scan or filled up from Model Manager. I would like to add description column. Where is the customizable LISP code?


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
9 REPLIES 9

There are directions in Modeling, in help search for BOM functions.

Basically you create 2 sketches for the table.

The BOM head which is the top of the bom table that names each column. Such as POS, Description, Quantity etc.

The BOM Component, This is a single row of the BOM table with the BOM attributes.

Once these sketches are made, they can be loaded into the am_mm_customize file as shown in the help document.

A sketch can also be created for the balloon.

Creo Element\Direct Modeling 20.6.0.0.0

Thanks Tom,

But I was just talking about the UI table (BOM table of) that pops up in the Modeling UI, just after sending BOM from Model Manager to Modeling; not about the table on the drawing. Aside Pos No, Quantity, Name, I would like to get Model Description as the 4th column.

Capture 20150512225400.JPG

I understand now. A picture is worth a thousand words. I am not sure how to change this table.

Creo Element\Direct Modeling 20.6.0.0.0
uaichholz
6-Contributor
(To:lfortner)

Hi Louis,

if you add a BomEditTableColumnModel section to your xml configuration file the configured columns will be displayed in Bomeditor by default if you start modelmanager for the first time.

Problem is that users can configure the table layout by right clicking into the table and modding the displayed attributes. This gets stored in %appdata%....

So I've modded the com.osm.datamgmt.action.SendToAnnotationAction and fixed the problem in code.

Might be possible that the <DefaultSendToCADReportConfig> tag in xml works too, but I came upon errors and needed a quick solution...

<BomEditTableColumnModel>

        <clear/>

        <Column>NAME

            <DisplayName catalog="awm_stda" msg_num="200">Name</DisplayName>

            <Width>8</Width>

        </Column>

        <Column>POS

            <DisplayName catalog="eprojects" msg_num="416">Pos No</DisplayName>

            <Width>5</Width>

        </Column>

        <Column>DB_QUANTITY

            <DisplayName catalog="model" msg_num="771">Modeled Qty</DisplayName>

            <Width>4</Width>

        </Column>

        <Column>DESCRIPTION

            <DisplayName>Bezeich. 1</DisplayName>

            <Width>30</Width>

        </Column>

<BomEditTableColumnModel>

Hi Uli,

My problem is not to fix the BOM layout on the 2D drawing, but rather the logical and display table layout as presented in my previous capture, that is the Modeling display table that raises up to the user to select masterdata when bubling the drawing.I need to rearrange this layout to make masterdata DESCRIPTION (and probably other MD attributes) appearing along POS, QTY and NAME.

dm-3
1-Newbie
(To:lfortner)

Louis,

Is this thread still open? Me too looking to customize BOM.

-

Dinesh

lfortner
11-Garnet
(To:dm-3)

I've not been able to customize the standard display table as expected (despite PTC support help).

Finally I designed a whole custom process that includes:

- on Modeling side: a new designed display table with some Lisp routines around

- on Model Manager side: a custom Handler with some java methods around

With these 2 components, I could manage a dual mode conversation between the applications to get expected data displayed as required.

The design principles is not too complex, but the realization was quite time expensive for the first time. Next time I'll run straightforward.

If you need additional détails, feel free to contact me back.

dm-3
1-Newbie
(To:lfortner)

Louis,

I would like to learn how you achieved it. I'm struggling for almost a month with step 1.

lfortner
11-Garnet
(To:dm-3)

Well dm-3,

My design supposes that a Modeling model has been already stored in Model Manager, and has a Db_elid attached. This is the key I use to retrive its BOM data. I first designed a Modeling handler this way
com.prototype.datamgmt.integration.command.osd.GetBomInfoHandler
This GetBomInfoHandler extends standard OSDCommandHandler. Its constructor is:
@Override
public String processCommand(List<String> parameters) throws WMException {
String modelingReturnValue ="";
String partElid = parameters.get(0);
File tempdir = WMFile.createTempDir();
String bomfilename = exportBom(partElid, tempdir);
modelingReturnValue = doubleEscapeFile(tempdir) + "/" + bomfilename;
return modelingReturnValue;
}
In short, it receives a String parameters, where the first one is the model Db_elid and returns a filename containing a CSL representation of its BOM. exportBOM() is the custom business worker to put the partEid BOM into the tempdir file in some CSL form.
The handler is included in the custom.xml configuration file this way:
<WMConfig>
...
<Handlers>
  ...
  <OSDHandler>GET-BOM-INFO
   <Implementation>com.prototype.datamgmt.integration.command.osd.GetBomInfoHandler</Implementation>
  </OSDHandler>
</Handlers>
...
 
On the modeling side the get-bom-file-name() function returns the file containing the BOM
(defun get-bom-file-name(part-elid)
;; Example: (manon::get-bom-file-name "CK0MQ78FHXTZZL")
(MODELMANAGER::MM-SEND-CMD (format nil "GET-BOM-INFO '~a'" part-elid))
)
It's now up to you to display the result, managing some errors as:

(defun manon-show-md-bom(md-elid)
;; Example: (manon::manon-show-md-bom "CK0MQ78FHXTZZL")
(setf bom-file-name (get-bom-file-name md-elid))
(when (or (null bom-file-name) (string= bom-file-name ""))
  (display (sd-multi-lang-string "Unable to get BOM file from Model Manager" :french "Impossible d'obtenir le fichier de nomenclature de Model Manager"))
  (return 0)
  )
(set-csl-ltab *manon-bomltab-name* bom-file-name)
(set-bom-display-table *manon-bomdtab-name* *manon-bomltab-name*)
(sd-show-display-table *manon-bomdtab-name*)
(sd-get-logical-table-number-of-rows *manon-bomltab-name*)
)

I hope this will be clear enough. You may ask me more if not.

Top Tags