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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Re-publish ideas needed

TomU
23-Emerald IV

Re-publish ideas needed

There doesn't appear to be an out-of-the-box way to force everything to republish.

Due to changes in our publish rules (additional files) and the creation of a publish filter (for extended positioning assemblies), I need to republish everything.

Unfortunately, manually republishing ignores the new publish filter. To make it work, all existing representations have to first be deleted, then the objects submitted again for publishing.

Does anyone have an easy way to delete and re-publish the latest iteration of each revision of all cad documents?

If not, what about deleting and re-publishing the latest version only?

Last resort, does anyone have an easy way to simply delete ALL representations system wide?

Thanks!

Tom U.

P.S. I realize you can develop custom publish schedules, but I don't have any idea how to work with/edit/create this custom Java code.
16 REPLIES 16
RandyJones
19-Tanzanite
(To:TomU)

You could create a java class or java code in a workflow template that querys for appropriate epmdocs and then republishes their representation.
See:

Would this work?

[cid:image001.jpg@01CFE70A.EB8365E0]


Regards,
[cid:image001.gif@01CFCB30.A000F600]

Stephen Vinyard
Director of Customer Success
ddemay
7-Bedrock
(To:TomU)

FYI - This is a victim of the query limit property if you have it set.




TomU
23-Emerald IV
(To:TomU)

Nope. A republish ignores the publish filter. According to PTC, the publish filter is only processed on a "publish.publish" event. When republishing the "publish.republish" event is used instead. So far they haven't been able to figure out how to connect another filter to that event.

mmeadows
1-Visitor
(To:TomU)

There is a command line utlity to delete representations. https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS62748



windchill com.ptc.wvs.server.util.DeleteRepUtil -h


The direct approach is to delete everything but that has major performance issues and is like driving a finishing nail with a sledge hammer. The command also accepts list files so you can define SQL or Query Builderqueries that return a list of the derived images to delete, parse the list into manageable chunks (e.g. 5000 at a time or maybe a context at a time), and iterate through your system until all latest have been republished.


Here is a SQL query that will work in Oracle or SQL Server to get you started. Replace the two occurrences of <product name="> with the name of a product and it will return a list of all the derived images in the product. It returns DerivedImages of WTParts and CAD Documents.


where part.idA2A2=derived.idA3theRepresentableReferencand part.idA3containerReference=prod.idA2A2



select derived.idA2A2 from DerivedImage derived, EPMDocument epmdoc, PDMLinkProduct prod


and prod.namecontainerInfo='<product name=">';


t just finds all representations per the current context. I

TomU
23-Emerald IV
(To:TomU)

Excellent!

I will do some testing on a single product and see how it works. Thanks!
MikeLockwood
22-Sapphire I
(To:TomU)

This command is very good to know about.

Currently working with a company that started off publishing all to PDF but will change to publishing all to HPGL - specifically to accommodate use of Creo View Drawing Compare. We were wondering how to be able to republish all and had a "figure out" line in the project plan for this. Just tried on a test server - works perfectly.
kimndave9
1-Visitor
(To:TomU)

Mike,


does Creo view compare compensate for:


View scale changes


View relocations or orientation changes


Views moved to alternate sheets


Drawing transitioning from paper to electronic?


While it sounds like your customer has their heart set on HPGL, I've had good performance using Photoshop (Elements is good enough) to created comparison overlays. WIth it, all the above can be handled (copy/paste and/or drag and/or rescale), including skewed paper images from fax machines with coffee stains on them (still need to scan to PDF) for those changes recommended from the factory. Not only can one determine by color the same/new/changed status, one can also (even if color blind) select and visually amplify any difference, picking up a lower case i from a lower case l or the change in a single dash length if one so cares.


A truly semantic checker would be best, but there's limited semantics after a pass into HPGL or PDF. That leaves visual differences or coordinate comparisons, and those fail for the above conditions.

TomU
23-Emerald IV
(To:TomU)

Randy,

In my specific case I don't have WT Parts, so I'm just using the second half. What's the proper syntax to make this work on a library?

Thanks!

MikeLockwood
22-Sapphire I
(To:TomU)

Creo View probably doesn't win any awards for the cases listed below, but once all is Creo-native (rather than coffee-stained photocopies), changes are very easy to check.

Seems that the Creo View Drawing Compare (historically ProductView Drawing Overlay) tool is one of the best things available in the system - probably underutilized because of both awareness and the fact that it requires publishing to be set up and always working.
TomU
23-Emerald IV
(To:TomU)

I think I figured it out. I just took out the section about product.

End result, all 'Released' + latest 'In Work' for both products and libraries. 🙂

select
derived.idA2A2
from
DerivedImage derived, EPMDocument epmdoc
where
epmdoc.idA2A2=derived.idA3theRepresentableReferenc and
epmdoc.statestate = 'RELEASED'

Union All

select
derived.idA2A2
from
DerivedImage derived, EPMDocument epmdoc
where
epmdoc.idA2A2=derived.idA3theRepresentableReferenc and
epmdoc.statestate = 'INWORK' and
epmdoc.latestiterationInfo = 1;


Total: 457,607

It's going to take the publisher a while....

Thanks!

Following all the great advice in this conversation I was able to get this to work for products, however I can't seem to get the syntax right to query in a library.  Any advice?

BineshKumar1
13-Aquamarine
(To:mdebower)

windchill com.ptc.wvs.server.util.DeleteRepUtil -CONT_PATH "wt.inf.container.OrgContainer=HighTech" -containerOID "wt.inf.library.WTLibrary:31012" -repname "default"

Did you try the above? You can get the container id from the URL.

Thank you,

Binesh Kumar

Barry Wehmiller

Hi Binesh,

Yes I can do that,  but I was wanting to use the SQL query to find all the representations in a library.

-marc

BineshKumar1
13-Aquamarine
(To:mdebower)

Hi Marc,

You can use below for library.

Thanks

Binesh Kumar

Barry Wehmiller

Select

derived.idA2A2

from

DerivedImage derived, EPMDocument epmdoc, WTLIBRARY lib

where

epmdoc.idA2A2=derived.idA3theRepresentableReferenc and

epmdoc.idA3containerReference=lib.idA2A2;

Announcements


Top Tags