Quantcast
Channel: PTC Community: Message List - Creo
Viewing all articles
Browse latest Browse all 11377

Re: How to get Windchill Part Name and Part Number in Creo Model?

$
0
0

Your question provides a good opportunity to share what I have found out on this topic, and the problems that we have run into.  I hope some of this information is helpful.  I would be interested to know if other users share any of these views.

 

On p214-217 of the “Using Creo® with Windchill®” (v10.0 M030, January 2012) manual PTC provide a table of the Preferences related to system attribute mapping and file properties (aka CAD parameters), which lists the following attributes:

 

PTC_WM_ITERATION

PTC_WM_LIFECYCLE_STATE

PTC_WM_LIFECYCLE

PTC_WM_NAME                                  (currently omitted from our Pro/E files)

PTC_WM_NUMBER                              (currently omitted from our Pro/E files)

PTC_WM_LAST_CHANGE_NOTE          (currently omitted from our Pro/E files)

PTC_WM_CREATED_BY

PTC_WM_CREATED_ON

PTC_WM_IS_DRAWING                        (currently omitted from our Pro/E files)

PTC_WM_MODIFIED_BY

PTC_WM_MODIFIED_ON

PTC_WM_ORGANIZATION_ID              (we get PTC_ORGANIZATION_ID instead)

PTC_WM_PART_NAME                        (currently omitted from our Pro/E files)

PTC_WM_PART_NUMBER                    (currently omitted from our Pro/E files)

PTC_WM_PART_REVISION_FOR_DRAWING    (currently omitted from our Pro/E files)

PTC_WM_PART_STATE_FOR_DRAWING          (currently omitted from our Pro/E files)

PTC_WM_REVISION

 

We have not changed any of the OOTB preferences for attribute mapping yet in our v10.0 M020 test server, and we assume this is the reason that we only see 9 of the 17 Attributes listed above being added to our Pro/E Wildfire4 files immediately upon Save to Workspace, even though WTParts are being created and associated automatically with the CAD Docs.  A similar (but not identical) list of 9 default attributes is shown on the old TAN 118262 https://www.ptc.com/appserver/cs/view/solution.jsp?n=118262.  Wouldn't it be nice if PTC kept all TPIs/TANs up to date ?

 

In addition we see the following 4 extra Windchill system attributes (Parameters) being added automatically in our Pro/E files :

PTC_MODIFIED                    (listed as Yes/No but drawings display it as True/False)

PTC_WM_LOCATION          (the path to Windchill context and folder)

PTC_WM_TEAM                 

PTC_WM_VERSION            (=  PTC_WM_REVISION. PTC_WM_ITERATION)

 

In our test setup we still make use of the “old” PROI_VERSION parameter to display on drawings instead of PTC_WM_ITERATION, as it very usefully shows the +sign (like you see in the Windows title bar) as soon as the file is modified in session (and we have also set the config.pro option dm_emulate_ilink_sys_paramters = yes).  The +sign is also shown correctly in the WGM, but for some reason PTC have stopped appending it to PTC_WM_ITERATION and instead suggest we make use of PTC_MODIFIED to indicate if a file has been modified locally and not yet checked-in.  Unfortunately this change will require some customisation work to re-instate the original behaviour on our Pro/E drawings if the PROI parameters are ever dropped by PTC in future (eg. to translate the True/False values into “+” / <blank>).

 

The absence of PTC_WM_NAME seems to be causing us no trouble (yet) as we have set up CAD Doc numbering and naming to use the filename with and without extension respectively, and we have a company convention to give filenames to Pro/E drawings that are the same as their related model (apart from the filename extension, so they are listed adjacent if they both exist), hence we can still use the Pro/E drawing filename parameter &drg_name to display what we’ve set as the model (file)name on the drawing.

 

On p 55-60 of the “Windchill® Workgroup Manager for SolidWorks® Administrator's and User's Guide” (v10.0, June 2011) it lists the Windchill Default System Attributes as follows :

 

PTC_WM_REVISION

PTC_WM_PART_NAME                  (currently omitted from our SW files)

PTC_WM_PART_NUMBER            (currently omitted from our SW files)

PTC_WM_NUMBER

PTC_WM_NAME

PTC_WM_ORGANIZATION_ID

PTC_WM_ITERATION

PTC_WM_LIFECYCLE

PTC_WM_LIFECYCLE_STATE

 

The subsequent section in that manual describes how these can be mapped to non-default File Properties (aka CAD Parameter) in Preference Management.  We have not done this yet, and we assume this is the reason that we only see 7 of the 9 Attributes listed above being added to our SolidWorks files immediately upon Save to Workspace, even though WTParts are being created and associated automatically with the CAD Docs.

 

What I still cannot understand is why PTC chose to provide a much shorter list of Windchill system attributes to the 3rd party CAD applications via the Workgroup Manager.  The WGM clearly has the ability to add and populate SolidWorks File Properties with some Windchill system attributes immediately upon a Save to workspace (which is great), but why is the list so limited, and why can’t we add the other ‘standard ones’ via some Preferences ?  In particular we want to be able to have these Windchill attributes made available to 3rd party CAD files, without having to resort to customisation :

PTC_WM_CREATED_BY

PTC_WM_CREATED_ON

PTC_WM_MODIFIED_BY

PTC_WM_MODIFIED_ON

PTC_MODIFIED

 

I've  posted this suggestion in the Ideas section (aka enhancement requests) - if you agree, please vote on it

It appear that My Idea was a broken link or hidden from public view (??), so now the URL is appended in the editing comment below !!

You can also try a Search for Idea number 1148.

 

Whilst that difference between 3rd party WGM’s and the Pro/E WGM might be overcome by customising the DefaultModeledAttributeDelegate.java file, a further difference in behaviour really undermines the credibility of PTC’s claim that “all the WGM’s work in the same way”.  In the 3rd party WGM, the value of PTC_WM_ITERATION is bumped up to the next value in the series immediately upon modification of a file, in anticipation of the next check-in ! 

 

This makes it much more difficult to distinguish between any prints of work-in-progress drawings and any not-yet-checked-in future version that is almost certainly going to be different – as both will display the same Version number !  I understand we can display Lifecycle states on drawings, and perhaps with some customisation we can also show if the file(s) are checked in or out – but these approaches to solving the problem are a very poor substitute for not having the same attributes and attribute behaviour as we get with Pro/E files.  When challenged about this PTC typically say they cannot do as much with 3rd party CAD application API’s (which I accept), but the description given above indicates that they could provide much more similarity between Pro/E and 3rd party CAD application with the existing WGM functionality, if they really wanted to.

 

On p63-64 of the same manual PTC describe Customizing Existing Windchill Attributes.  They say “To create more authoring application parameters, Windchill provides a server-side delegate that can be used to customize the system parameters added to the CAD file upon download.” –  and they give a list of reserved Windchill attributes (that relate to the associated WTParts) that the delegate can provide as follows :

 

SP_WM_PART_REV

SP_WM_PART_ITERATION

SP_WM_PROJECT

SP_WM_VIEW

SP_WM_PART_LIFECYCLE

SP_WM_PART_TYPE

SP_WM_PART_LC_STATE

 

In addition to these 7 reserved attributes, the sample delegate file also includes these 4 attributes, which you might be able to use or replace :

 

WT_CADDOC_NUMBER

WT_ASSOCIATED_PART_NUMBER

WT_ASSOCIATED_PART_NAME

ECN_NUMBER

 

We are only just starting to experiment with customising the ‘download delegate’.  If we can get it to work as we want, then I will update this posting.

 

Message was edited by: Nick Drought - added reference to TAN 118262

 

Message was edited by: Nick Drought (trying to fix broken URL)

 

http://communities.ptc.com/ideas/1148


Viewing all articles
Browse latest Browse all 11377

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>