Is there any way to create a single drawing template/format that can be used for both parts and assemblies? The main difference being the addition of a BOM table for an assembly.
Essentially, I want the template to recogonize if I'm pulling in an assembly and show the BOM table, and if it's a part, don't show the table. I was hoping the Drawing Program interface would give me similiar capabilities to Pro Program, such that I could set up a relation to turn features on/off. However, it doesn't appear to work that way.
Is this possible? Or am I stuck with using two templates?
Thanks for any and all help.
I use the drawing program to switch layers on and off depending on a parameter value. Not sure if it is smart enough to do it automatically. You could set up a parameter in your start parts that is read by the drawing program to turn on the BOM layer if the part loaded into the drawing is an assembly.
I actually tried something similiar to this, however it didn't seem to work.
Here's what I did:
1. Defined a State through Drawing Program that blanked the layer containing the BOM and called it Part.
2. Edited the program and inserted the following:
IF &MBR.TYPE == PART
SET STATE PART
It says there is an error in line one so I'm assuming it's having an issue with the &mbr.type parameter (I also tried asm.mbr.type). Is there another parameter that returns the part type? Or is my syntax just wrong?
There is no such system parameter as mbr.type, so that's probably why you're getting errors. There is asm.mbr.type which holds the information on type of every component used in assembly you put in the drawing and there is type, which is a system parameter for type of the active drawing model.
In your case I'd try to go with
IF &TYPE == PART and so on.
This works if you create a part/assembly level parameter and delete the '&'. I created a parameter called drawing_type and set it equal to part and assembly in the appropriate start part files.
The code I used was:
SET STATE PART
SET STATE ASSEMBLY
I'm no longer getting any errors with the code, but now it locks into whatever file you use first. In other words, if I try to use the drawing template on a part, it correctly sets the state, but then when I create a subsequent assembly drawing -- the state stays locked as PART.
Drawing programs have serious limitations, especially if you want to change models or store them in Windchill. See the following articles.
(And yes, it bugs me to no end that they tell you to use ":0" in some articles and then tell you NOT to do so in other articles!)
Here is a old discussion we had over at PTC User on this same topic.
Create a format with two sheets, one with a partslist and one without.
When creating a drawing based on this format the system will ask you to select the appropriate format sheet.
One thing to keep in mind, if you have the BOM table on the format and then reapply the format (to change sheet sizes, etc.), the BOM table may be removed and then recreated (depending on the selection made on the "remove old tables" dialog). That means any balloons that have been created will be lost. For this reason I prefer to add the BOM table manually to assembly prints. That way no matter how the format is reapplied, it will never impact the BOM table. It's certainly easy enough to create a mapkey to automatically add the BOM table and even create the balloons.