×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

BOM FORMAT SAVE

BOM FORMAT SAVE

BOM FORMAT SAVE

(OP)
Is there a way to create and save a bom format? The format always reverts to the default (AP203) and changes the bill on the drawing. We currently create a new view in the drawing and insert the bill into it (after modifying the format to our standards) then lock that view so the bill does not change to the default (AP203) format when the drawing is opened the next day. This works but it also prevents the bill from updating if there are changes to the product, this is a problem.

RE: BOM FORMAT SAVE

I was also wondering about this, so I read the catia help. It says that "You cannot save the formats you create. Customized formats are specific to your CATIA session." So it seems that it is not possible, sorry.

RE: BOM FORMAT SAVE

(OP)
Thanks for the info...I do not have access to the catia help section. I wonder why catia would not allow you to customize a bom? Doesn't make any sense.

RE: BOM FORMAT SAVE

You can make a script for this.  I don't write them and managed to create this one.

Language="VBSCRIPT"

Sub CATMain()

Set productDocument1 = CATIA.ActiveDocument

Set product1 = productDocument1.Product

Set assemblyConvertor1 = product1.GetItem("BillOfMaterial")

Dim arrayOfVariantOfBSTR1(7)
'            arrayOfVariantOfBSTR1(0) = "Quantity"
arrayOfVariantOfBSTR1(0) = "Part Number"
arrayOfVariantOfBSTR1(1) = "Type"
'            arrayOfVariantOfBSTR1(2) = "Source"
'            arrayOfVariantOfBSTR1(3) = "Number"
'            arrayOfVariantOfBSTR1(4) = "Part Number"
'            arrayOfVariantOfBSTR1(5) = "Revision"
'            arrayOfVariantOfBSTR1(6) = "Definition"
'            arrayOfVariantOfBSTR1(7) = "Nomenclature"
arrayOfVariantOfBSTR1(2) = "Product Description"
arrayOfVariantOfBSTR1(3) = "Quantity"
'            arrayOfVariantOfBSTR1(9) = "Component Description"
'            arrayOfVariantOfBSTR1(10) = "Source"
'            arrayOfVariantOfBSTR1(11) = "Default Representation Source"
'            arrayOfVariantOfBSTR1(12) = "Comment"
'            arrayOfVariantOfBSTR1(13) = "List Of Named URLs"
arrayOfVariantOfBSTR1(4) = "Material"
arrayOfVariantOfBSTR1(5) = "Vendor"
arrayOfVariantOfBSTR1(6) = "Process"
arrayOfVariantOfBSTR1(7) = "Block Weight"
assemblyConvertor1.SetCurrentFormat arrayOfVariantOfBSTR1

Dim arrayOfVariantOfBSTR2(0)

assemblyConvertor1.SetSecondaryFormat arrayOfVariantOfBSTR2

End Sub


Regards,
Derek
 

RE: BOM FORMAT SAVE

(OP)
Derek,
Thanks for the info. I'm not familiar with scripts and how to use them. Can you give me a quick lesson on how to do this?

Thanks,
Mike

RE: BOM FORMAT SAVE

Start a fresh session of Catia
- File New Product
- Tools - Macro - Start Recording
If no macro library exists - create 1 under Macro Libraries
rename file, but leave it as a .catvbs
A new menu will pop up with a square in it.  This will stop recording.
- Analyze - Bill of Material
- Define Format
setup the columns Press OK
Press OK to exit the analyze box.
Stop Recording

To run the macro
- Tools - Macro - Macros (short cut Alt+F8)
- Run.

Regards,
Derek
 

RE: BOM FORMAT SAVE

(OP)
Derek,
Is creating and running that macro that you described the same thing as the script you wrote? I created the macro and it changes the bom from "ap203 format" to "externalformat.1" and it is setup corectly. I assume that I need to run this macro at every start up? Can i set up to catia to run this macro automatically at start up?

Thanks,
Mike

RE: BOM FORMAT SAVE

Change your startup short cut to call the macro (you might find this slows startup due to CATIA having to load lots of extra libraries)

From the docs B18doc/English/online/basug_C2/basugbt1903.htm
Title : Running a Macro

cnext -env CATIA.V5R16.B16 -macro E:\tmp\Mymacro.CATScript

RE: BOM FORMAT SAVE

Mike, I run it before creating the BOM.  You can make an icon for it under - Tools - Customize - Commands - Macros.

Regards,
Derek  

RE: BOM FORMAT SAVE

(OP)
Thanks Derek, That will definately work but I would like to take it one step further to eliminate that step if possible.
DBezaire, this is our target on the start-up short cut:

"C:\Program Files\Dassault Systemes\B17\win_b64\code\bin\CATSTART.exe"  -run "CNEXT.exe" -env CATIA.V5R17.B17 -direnv "C:\Documents and Settings\All Users\Application Data\DassaultSystemes\CATEnv" -nowindow

can you show me where I add the command to run the macro?

RE: BOM FORMAT SAVE

(OP)
I created a macro for the bom format and it works great. The problem is that you have to be in a product to run the macro. This makes it not possible to run the macro at catia start-up. Is there a way to get around this?

RE: BOM FORMAT SAVE

(OP)
Ferdo,
Can I add the macro to the existing product design workbench? This would be easier than creating a new workbench. Also I did not notice anything about adding a macro to the workbench in the video. How do I do that? If I get the macro into the product design workbench it will run automatically when the workbench is called up?

RE: BOM FORMAT SAVE

Huntwe, it would not run when the workbench is started.  To add it as an icon - Start the ASD workbench,  Tools -- Customize --  Toolbars.  Select the toolbar to add the macro, Add Commands.
Find your macroname.catvbs in the list.  Ok

Regards,
Derek
 

RE: BOM FORMAT SAVE

Hi,

Derek is right, also Peter's suggestion is good.

What I can suggest you is to create a task in Windows (I saw that you are working under Win) to start-up CATIA running that macro at a specific hour, so when you will enter in the office CATIA will be open and the macro already executed (I'm sure  that your IT guy can done this job for you..if you don't have problems with users, passwords a.s.o.).

In this case you have to apply what PeterGuy said (which I believe is the only reasonable solution).

Regards
Fernando

RE: BOM FORMAT SAVE

(OP)
For now I have created an icon in the assembly design workbench. I will just have to remember to run the macro when I need it. It seems the only way to run this macro  automatically is to figure out how to run it without being in the product, or, create a different macro that could run outside the product.  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources