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

We are happy to announce the new Windchill Customization board! Learn more.

Windchill : publish PVZ only if already exist.

Hugues
7-Bedrock

Windchill : publish PVZ only if already exist.

Hi there,

My request will seem trivial to you, but I realized that it was not.

As part of a workflow for publishing PVZ files from CAD documents, I want to write a publishrules that will publish these PVZ files at checkin, but only if a previous publication has already taken place manually.

 

Here is the scenario:

A design team is working on Creo PARAMETRIC and storing their work in Windchill.

In parallel, another team works with Creo ILLUSTRATE to create technical illustrations.

In order not to clutter the database, as long as no member of this team has manually triggered the creation of a PVZ file from an ASM, nothing should happen when this ASM is modified by the members of the design team.

But once a PVZ has been created for the first time by an illustrator, then the next time a designer modifies the source ASM, the PVZ should be updated automatically.

I searched to achieve this with publishrules, but couldn't find it.

And I don't want to go through a specific development.

Has anyone ever faced this problem?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
21-Topaz II
(To:Hugues)

Hi @Hugues 

Got it. 

 

In this case the customization is needed. 

 

Listener that is activated during checkin process,

code that search for a previous manual visualization

if the conditions is met send the visualization to the queue with specific publish rules.

 

it is possible in my opinion. 

For example you can send the visualization by a following api with a XML definition of Publish Rule (where is GDD defined):

 

com.ptc.wvs.common.ui.Publisher publisher = new com.ptc.wvs.common.ui.Publisher();
com.ptc.wvs.common.ui.PublisherAction publishAction = new com.ptc.wvs.common.ui.PublisherAction(com.ptc.wvs.common.ui.PublisherAction.QUEUEPRIORITY, "H");

objRef = wt.fc.ObjectReference.newObjectReference(epm).toString();

publisher.doRulesPublish(false,
									true,
									 objRef,
									 null,
									 null,
									 false,
									 "visualization name",
									 "visualization description",
									 Publisher.EPM,
									 publishAction.toString(),
									 0,
									 publishRules);

 

PetrH

View solution in original post

4 REPLIES 4
HelesicPetr
21-Topaz II
(To:Hugues)

Hi @Hugues 

I haven't got that experience.

Each time if the visualization of a CAD Document is created. and the GDD publish rules works, the illustration source document is modified with new version. It is separate Document where PVZ is primary content.

It is done as a postpublish operation after visualization of the CADDocument is done.

 

May be I missed the point. 

 

PetrH

Thank you for your answer @HelesicPetr .

The objective is the following:
Do not clutter the base with unnecessary objects.
So, I wish Windchill's normal behavior was to NOT post PVZs on checkin.
But, if a user decides to create one for the first time manually, then I would like that at the next modification and reintegration of the source ASM, the PVZ is republished this time automatically.

HelesicPetr
21-Topaz II
(To:Hugues)

Hi @Hugues 

Got it. 

 

In this case the customization is needed. 

 

Listener that is activated during checkin process,

code that search for a previous manual visualization

if the conditions is met send the visualization to the queue with specific publish rules.

 

it is possible in my opinion. 

For example you can send the visualization by a following api with a XML definition of Publish Rule (where is GDD defined):

 

com.ptc.wvs.common.ui.Publisher publisher = new com.ptc.wvs.common.ui.Publisher();
com.ptc.wvs.common.ui.PublisherAction publishAction = new com.ptc.wvs.common.ui.PublisherAction(com.ptc.wvs.common.ui.PublisherAction.QUEUEPRIORITY, "H");

objRef = wt.fc.ObjectReference.newObjectReference(epm).toString();

publisher.doRulesPublish(false,
									true,
									 objRef,
									 null,
									 null,
									 false,
									 "visualization name",
									 "visualization description",
									 Publisher.EPM,
									 publishAction.toString(),
									 0,
									 publishRules);

 

PetrH

Hi Petr,

 

Thank for your response and advice.

 

Hugues.

 

 

Top Tags