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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

PTC parameters.....

BrianKrieger
7-Bedrock

PTC parameters.....

I may be missing it, but is there a way in JLink to access the standard
PTC parameters. For example the parameters:



PTC_WM_ITERATION

PTC_WM_LOCATION



Etc. get created once the item gets checked in. There are other
parameters in WC such as Name, Number, etc. I am trying to see if I can
access these through the Pro/E JLink interface. Specifically, I'm
trying to access the Name parameter. For models and drawings it is a
parameter called ptc_common_name. The challenge is that I am trying
this in Diagram (which doesn't have common name).



Any thoughts or work arounds anyone has tried?



Thanks!

Brian Krieger

Peterbilt Motors

2 REPLIES 2

Brian -

It's easy to miss this, because JLink is an elaborate hierarchy of
interfaces
and classes:

> I may be missing it, but is there a way in JLink to access the standard
PTC parameters.
> For example the parameters:
>
> PTC_WM_ITERATION
> PTC_WM_LOCATION

If you look at the JLink docs for the class Diagram; you should see this
section:

Methods Inherited from Interface
com.ptc.pfc.pfcModelItem.ParameterOwner
GetParam, CreateParam, ListParams, SelectParam, CreateParamWithUnits,
SelectParameters

That means that Diagram contains a method called "ListParams" which will
give you
a list of parameter objects for your model. Accessing the values of those
parameters
takes much additional work, however. It's best to consult as much example
code as you
can get.

> Specifically, I’m trying to access the Name parameter. For models and
drawings
> it is a parameter called ptc_common_name.

I don't think common name is stored in a model parameter. Both Pro/Toolkit
and
JLink have dedicated functions for this. In JLink, it's

com.ptc.pfc.pfcModel.Model.GetCommonName

Again, Diagram inherits this method from the Model interface.

|+| M a r k |+|

Mark Stallard
Rapid Response Development
information Solutions
Integrated Defense Systems
Raytheon Company




(business)
+1.978.436.6016
(cell)
+1.617.331.5443
(tie line)
239.6016

-



880 Technology Drive
Billerica, MA 01821
www.raytheon.com


Raytheon Sustainability

This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this message
in error, please so advise the sender by reply e-mail and delete this
message. Thank you for your cooperation.









Sweet, Mark! I glossed right over the getCommonName method. And I
should have clarified that the ListParams doesn't list the name (or a
few other default parameters I think). It does list several other WM
params (team, organization, iteration, etc.). In a normal drawing I can
get around it as I can just use &ptc_common_name. But for diagram, it's
not accessible through a note like that.



Thanks again!

BK


Top Tags