BOM
BOM
(OP)
Hello,
I red some arts about BOM, but I can't still figure out, why I do not have mass position in "Define formats".
Best Regards
Santa123
I red some arts about BOM, but I can't still figure out, why I do not have mass position in "Define formats".
Best Regards
Santa123





RE: BOM
Check this
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: BOM
I have Catia R21 and when I right click on the value field of the new property I have options:
- Add Multiple Values
- Add Range
- Edict Comment
- Lock
I do not have formula option, but I can add formula by means of formula button from Knowledge Tool bar.
Is it possible to add parameters to Product Added field by macro?
Respect
Santa123
RE: BOM
If you want to have different other properties/characteristics for each component of assy in BoM (linked parametrically), you NEED to do it like this (see picture attached)
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: BOM
But I ned to add mass and material to 50 existing Parts, so I think the best way to do this is by means of macro.
Respect
Santa123
RE: BOM
CODE -->
Language="VBSCRIPT" Sub CATMain() Set documents1 = CATIA.Documents for i=1 to CATIA.Documents.count Set partDocument1 = documents1.item(i) if typename(partDocument1)="PartDocument" then Set product1 = partDocument1.Product Set parameters1 = product1.UserRefProperties Set part1 = partDocument1.Part Set parameters2 = part1.Parameters Set strParam2 = parameters2.Item("Material") Err.Clear On Error Resume Next Set strParam1=parameters1.Item("Material") errNumber = CLng(Err.Number) if errNumber <> 0 then Set strParam1 = parameters1.CreateString("Material", strParam2.Value) else strParam1.valuatefromstring(strParam2.Value) end if Err.Clear On Error Resume Next Set dimension1 = parameters1.Item("Mass") errNumber = CLng(Err.Number) if errNumber <> 0 then Set dimension1 = parameters1.CreateDimension("Mass", "MASS", 0.000000) dimension1.ValuateFromString Cstr(1000000*product1.analyze.mass)&"mg" else dimension1.ValuateFromString Cstr(1000000*product1.analyze.mass)&"mg" end if end if next End SubLet me know if it works
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
RE: BOM
Respect
Santa123
RE: BOM
CODE -->
Anyway, You can use this code to set and update those parameters.
To change parameter name change "Mass" in line above
Mass is calculated automatically for each part in properties->mass depending on volume and density, You need to define material properties (density) to get proper value
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
RE: BOM
lukaszsz / fernando
I wonder is there any way to link this mass to the drawing document parameter named "weight" which in-turn will link back to a text in background as an attribute link.
i.e
Mass -----------------------> Weight --------------------------> Text
(Part Parameter) or (Drawing Parameter) (Drawing Text)
(Product Parameter)
establishing an external link while doing the above said parameter mapping will make the job a lot easier.
Also,
How to create external properties using macro and add a relation between them, I mean two different documents.(could u make an example and show for better clarity.)
Automation Documentation doesn't really provide any information on this. Do we have to this external linking manually or what?
could you guys help me on the same.
Regards.
Maddy
RE: BOM
It could be very interesting, as I found, there is no possibility to create external parameter through CATIA (as end-user), maybe automation will helps. There is no other option than try do it yourself :)
External parameters via VBA:
http://v5vb.wordpress.com/2010/05/11/developing-na...
How to define UserDefinedProperties as relation with existing parameter
http://www.eng-tips.com/viewthread.cfm?qid=341826 (12th reply)
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
RE: BOM
Sorry if i'm wrong, this is in regard with automation only.
I want to simulate end user activity in linking parameter of one document with the parameter of other document.
take Mass as said above.
End user activity
1. User will measure the inertia which creates "Mass" in part document.
2. User will create a parameter in drawing called "Weight"
3. User will link this drawing parameter "Weight" with the "Mass" of part parameter through f(x) dialog box.
- Doing so will result in creation of external parameter automatically in drawing along with relation (i.e similar to formula creation).
If user changes the part then mass will get changed.
To get the updated "Mass" value displayed in "Weight"'s property, user needs to sync the external parameter in drawing.
My requirement is to simulate the same through automation.
If not clear will upload a video for reference.
Regards,
Maddy
RE: BOM
Thanks for time though and will go through v5vb
Regards,
Maddy
RE: BOM
How does formula look like? I'm wondering, because I've never linked external parameters through f(x) without copy-paste special elements.
Of course, If You know how to perform those steps as end-user, it also can be done automatically, through VBA/VBScript.
At this moment the only solution I know is to update Weight parameter through catvba, with no links to referenced CatPart or its parameters, so please, post Yours formula.
Lukasz
LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013