CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 03-02-2023, 07:24 AM
rvn rvn is offline
Registered User
 
Join Date: Mar 2011
Posts: 52
BOM issue

We run against some problems for the BOM and BOM flags in annotation, we are trying to explain everything to PTC, but it takes a long time.

So I want to create my own “current bom” in annotation with all the necessary data I’ll find in windchill also by a small customization.

I already know that there 3 tables in annotator (drafting) that should be filled.
'Docu_bom_ic_sysids_ltab'
'Docu_am_bom_comp_ltab'
'Docu_current_bom_posno_ltab'
I can fill these tables with the necessary data with some annotator commands.

There is also a table in annotation called “AM-BOM-DATA-LTAB” and “AM-BOM-DATA-DTAB”.
These tables are also not a big problem to create.
But then I want to hook these tables to each other with the “am-bom-update” command in annotation.

Then I get the error “You should first retrieve a BOM ...”
I get the same error if I want to add bom flags to the drawing.

So somewhere there should be a command to say to annotation that he received a BOM somewhere.

And now my real question.
Is there somebody who customized this bom completely from scratch and can help me with the code?
Reply With Quote
  #2  
Old 03-05-2023, 05:38 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 755
Lightbulb Re: BOM issue

Quote:
Originally Posted by rvn View Post
We run against some problems for the BOM and BOM flags in annotation...

I already know that there 3 tables in annotator (drafting) that should be filled.
'Docu_bom_ic_sysids_ltab'
'Docu_am_bom_comp_ltab'
'Docu_current_bom_posno_ltab'
I can fill these tables with the necessary data with some annotator commands.

There is also a table in annotation called “AM-BOM-DATA-LTAB” and “AM-BOM-DATA-DTAB”.
These tables are also not a big problem to create.
you are starting from the wrong end. You should not fiddle with those Annotator/Drafting LTABs at all. Don't do so!

Work through this:
https://support.ptc.com/help/creo/ce..._cust_bom.html

the three functions
  • (DOCU-LOAD-BOM-HEAD-LAYOUT...)
  • (DOCU-LOAD-BOM-COMP-LAYOUT...)
  • (DOCU-LOAD-BOM-FLAG-LAYOUT...)
define the layout of your bom table and bom flags on the drawing. The customization of those snippets is done interactive and using standard functionality like texts, geo, sketches and text-references. If adding a columen to your bom table you need to interacive edit your bom header and the bom component. Save those sketches on disk and register those files using the above mentioned functions.

==================

Adding new / other data you need to register a new BOM Attriubte:
  • DOCU-REGISTER-BOM-ATTR
The major thing here is the attr-value-fnc. This one has to return a (well formatted) value for that attrbiute for one selitem (= a 3D part).

In the example (see link above) this is done e.g. by (defun bomattr-get-partno...) Here it is done with the generic item-attribute functionality, that way the example code is working withtout any database connected.

In your case e.g. you can write your own function, and register that one ..

Code:
(defun bomattr-get-UWGM-partno (selitem)
  (or (sd-uwgm-inq-commonname selitem) "n/a") ;; may be shorten the string if its too long 
  )

(docu::docu-register-bom-attr :attr-type      "UWGM_PART_NO"
                              :attr-title     "WT Part No"
                              :attr-display   t
                              :attr-value-fnc #'bomattr-get-UWGM-partno)
Short sequence, preparation:
  1. write your own function to retrieve ONE attribute for ONE object
  2. register this function creating a new BOM attribute (now it will be available as text reference in the BOM - group)
  3. adapt the BOM Header and BOM component layout.
    1. in the header add a FIXED title
    2. in the component add a dummy text and assign it the new text reference
  4. register the adapted header/component layout (e.g. in am_customize or uwgm_customize_2d)
  5. may be restart modeling / annotation

Short sequence, usage:
  • Use the BOM SCAN utility within Annotation
    now a display table will be shown in the Annotation UI
  • place the BOM table in the drawing, using YOUR adapted BOM Layout

Hint: use
Code:
(trace bomattr-get-UWGM-partno)
to watch input and output of your function.
It will be called for each component part of your assembly and should return the windchill's commonname.
Reply With Quote
  #3  
Old 03-05-2023, 05:48 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 755
Arrow Re: BOM issue

Additional remark:

I highly recommend to read / work and understand that documention I send the link of. It is well done and working for 25 years. There was no change on this functionality.


AFAIR all the standard windchill attributes are already availalble out of the box as text references. So you only have to adapt a BOM Layout and add 'a column'.

For your own windchill attribute you can use
Code:
(sd-uwgm-inq-model-attribute selitem "CUST_MATERIAL") ; e.g.
instead of sd-uwgm-inq-commonname as in the previous post.

BTW: my companies Laptop is OFF during the weekend, so I only WROTE but did not test it. ��

For people with less english skills: Entry point DOCU-REGISTER-BOM-ATTR : https://www.bing.com/search?q=%22DOCU-REGISTER-BOM-ATTR%22+site%3Asupport.ptc.com

Last edited by Wolfgang; 03-05-2023 at 05:58 AM. Reason: adding documentation link as search engine URL
Reply With Quote
  #4  
Old 08-21-2023, 05:24 AM
rvn rvn is offline
Registered User
 
Join Date: Mar 2011
Posts: 52
Re: BOM issue

Hi Wolfgang,

Thanks for all the information. This was very helpful and it helped me to achieve my goal.

thx
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:35 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.