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

Adding attachments to CAD documents in WC

Highlighted
Participant

Adding attachments to CAD documents in WC

Is there any way to add attachments in the "Content" tab to CAD drawings without iterating the document?  I run into this situation often where someone forgets to attach a reference document before they have released an item, and then they ask me to attach it.  The issue I have with it is then I have to perform this action as Orgadmin being it is already released, and now the released document shows "Last Modified" by Orgadmin in the title block (instead of the real engineer), and worse, last modified at a date after which the document was already released.

Being this is just reference data, forcing the engineer to revise the entire drawing would be a waste of money.

5 REPLIES 5

Re: Adding attachments to CAD documents in WC

Don't use the Windchill PTC_WM_* attributes directly. Set a company attribute based on the PTC_WM attribute, then the drawing will not change until it is actually modified at the next revision. This will allow you to add the document to the content tab, which does require a check out/in - iteration, to accomplish.

Re: Adding attachments to CAD documents in WC

Ben Loosli‌, do you do this for revision as well?

Re: Adding attachments to CAD documents in WC

Yes, because the title block information is static after the first release of a drawing. Further checks and approvals are carried in the revision block.

Re: Adding attachments to CAD documents in WC

That is a good idea Ben.  I would actually like to get that set up.  I am curious, does your attribute get set based on who originated the drawing? Or who was last modified when it was initially released?  Or what are you looking to drive that data?

Do you by chance have an example of how you set that up?

Re: Adding attachments to CAD documents in WC

We set it to the initial creator of the drawing file.

Here is the start-assy.asm relations file. YCN = Your Company Name, use whatever you want for a prefix.

We designed in mm, but manufactured world wide, so included some English based values for reference.

Lengths weren't usually a problem for conversion, but area and weight were.

/************************* ASSEMBLY START RELATIONS **********************
/* Calculate the weight and surface area
/* -------------------------------------
/* You must do a mass properties analysis and then regenerate the part
/* for the weight and surface area parameters to be up-to-date.
YCN_WEIGHT_KG = PRO_MP_MASS
YCN_WEIGHT_LB = PRO_MP_MASS * 2.20462
YCN_AREA_CM = PRO_MP_AREA / 100
YCN_AREA_IN = PRO_MP_AREA * 0.00155

/* Set part name parameters for bom
/* --------------------------------
/* YCN_part_no  parameter  is always equal to the model name.
YCN_PART_NO = EXTRACT(REL_MODEL_NAME(),1,8)

/* YCN_dwg_no parameter is always equal to YCN_part_no
/* if they are not, comment this relation or change
/* to the charted drawing number
YCN_DWG_NO = YCN_PART_NO

/* Drawing Parameters
/* ------------------
/* Date Parameters from Windchill
/* ------------------------------
/* Extract the date portion of the windchill timestamp params
SHORT_CREATED_ON = EXTRACT(PTC_WM_CREATED_ON,1,10)
SHORT_APPROVED_DATE = EXTRACT(YCN_APPROVED_DATE,1,10)
SHORT_MODIFIED_ON = EXTRACT(PTC_WM_MODIFIED_ON,1,10)
YEAR = EXTRACT(PTC_WM_MODIFIED_ON,1,4)

/* Name Parameters from Windchill
/* -------------------------------
/* Shortened to fit the drawing formats
if STRING_LENGTH(YCN_INITIAL_CREATED_BY) > 8
  SHORT_CREATED_BY = EXTRACT(YCN_INITIAL_CREATED_BY,1,8)
else
  SHORT_CREATED_BY = YCN_INITIAL_CREATED_BY
endif

if STRING_LENGTH(PTC_WM_MODIFIED_BY) > 8
  SHORT_MODIFIED_BY = EXTRACT(PTC_WM_MODIFIED_BY,1,8)
else
  SHORT_MODIFIED_BY = PTC_WM_MODIFIED_BY
endif

if STRING_LENGTH(YCN_APPROVED_BY) > 8
  SHORT_APPROVED_BY = EXTRACT(YCN_APPROVED_BY,1,8)
else
  SHORT_APPROVED_BY = YCN_APPROVED_BY
endif

if STRING_LENGTH(YCN_REV_APPROVED_BY) > 8
  SHORT_REV_APPROVED_BY = EXTRACT(YCN_REV_APPROVED_BY,1,8)
else
  SHORT_REV_APPROVED_BY = YCN_REV_APPROVED_BY
endif

/* Initial Release Parameters
/* Set YCN_initial values for drawing parameters from windchill
/* only when rev is 0
if PTC_WM_REVISION == "0"
  YCN_INITIAL_ECN = YCN_ECN
  YCN_INITIAL_CREATED_BY = PTC_WM_CREATED_BY
  YCN_INITIAL_CREATED_ON = SHORT_CREATED_ON
endif
/************************* ASSEMBLY RELATIONS ***********************