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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

One drawing template for both Parts and Assemblies

rallen-2
1-Visitor

One drawing template for both Parts and Assemblies

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.

 

--


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.
7 REPLIES 7
BenLoosli
23-Emerald II
(To:rallen-2)

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

ENDIF

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?

Thanks again.

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:

IF DRAWING_TYPE="PART"

SET STATE PART

ENDIF

IF DRAWING_TYPE="ASSEMBLY"

SET STATE ASSEMBLY

ENDIF

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.

TomU
23-Emerald IV
(To:rallen-2)

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!)

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS103181

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS95046

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS166261

https://support.ptc.com/appserver/cs/view/solution.jsp?n=114055

Here is a old discussion we had over at PTC User on this same topic.

http://portal.ptcuser.org/p/fo/st/post=118912&anc=p118912#p118912

huggre
12-Amethyst
(To:rallen-2)

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.

Hugo

TomU
23-Emerald IV
(To:rallen-2)

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.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags