Skip to main content
23-Emerald IV
October 13, 2014
Question

Re-publish ideas needed

  • October 13, 2014
  • 16 replies
  • 5488 views
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

20-Turquoise
October 13, 2014
You could create a java class or java code in a workflow template that querys for appropriate epmdocs and then republishes their representation.
See:
1-Visitor
October 14, 2014
Would this work?

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


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

Stephen Vinyard
Director of Customer Success
1-Visitor
October 14, 2014
FYI - This is a victim of the query limit property if you have it set.




TomU23-Emerald IVAuthor
23-Emerald IV
October 14, 2014
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.

1-Visitor
October 14, 2014

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

TomU23-Emerald IVAuthor
23-Emerald IV
October 14, 2014
Excellent!

I will do some testing on a single product and see how it works. Thanks!
22-Sapphire I
October 14, 2014
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.
1-Visitor
October 14, 2014

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.

20-Turquoise
October 14, 2014
On 10/14/14 07:30, Matt Meadows wrote:
>
> There is a command line utlity to delete representations.
>
> select derived.idA2A2 from DerivedImage derived, WTPart part, PDMLinkProduct prod
>
> where part.idA2A2=derived.idA3theRepresentableReferencand part.idA3containerReference=prod.idA2A2
>
> and prod.namecontainerInfo='<product name=">'
>
> Union All
>
> select derived.idA2A2 from DerivedImage derived, EPMDocument epmdoc, PDMLinkProduct prod
>
> where epmdoc.idA2A2=derived.idA3theRepresentableReferencand epmdoc.idA3containerReference=prod.idA2A2
>
> and prod.namecontainerInfo='<product name=">';
>
> Note it just finds all representations per the current context. It doesn't exclude markups/annotations. It doesn't find just latest or all non-released iterations either. Anyone have these more advanced/appropriate queries they would be willing to share?
>

You can add statestate and latestiterationinfo fields in the where clause. For example to find the latest iterations of objects at state = 'RELEASED' your query would look like this:

select
derived.idA2A2
from
DerivedImage derived, WTPart part, PDMLinkProduct prod
where
part.idA2A2=derived.idA3theRepresentableReferenc and
part.idA3containerReference=prod.idA2A2 and
prod.namecontainerInfo='<product name=">' and
part.statestate = 'RELEASED' and
part.latestiterationinfo = 1
Union All
select
derived.idA2A2
from
DerivedImage derived, EPMDocument epmdoc, PDMLinkProduct prod

where
epmdoc.idA2A2=derived.idA3theRepresentableReferenc and
epmdoc.idA3containerReference=prod.idA2A2 and
prod.namecontainerInfo='<product name=">' and
epmdoc.statestate = 'RELEASED' and
epmdoc.latestiterationinfo = 1;


> In Reply to Tom Uminn:
>
> 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.
> ********** CONFIDENTIALITY NOTICE ********** The information in this email may be confidential and/or privileged. This email is intended to be reviewed and used only by the individual or organization named above for the explicit purpose of conducting business with Trans-matic Mfg. Co. If you
> are not the intended recipient or an authorized representative of the intended recipient, you are hereby notified the any review, dissemination or copying of this email and its attachments, if any, or the information contained herein is strictly prohibited, and no privilege or protection has
> been waived. If you have received this email in error, please notify the sender immediately by return email and delete this email from your system.
>
>
> -----End Original Message-----


--
------------------------------------------------------------------------
Randy Jones
Systems Administrator
Great Plains Mfg., Inc.
1525 E North St
PO Box 5060
Salina, KS USA 67401
email: -
Phone: 785-823-3276
Fax: 785-667-2695
------------------------------------------------------------------------

TomU23-Emerald IVAuthor
23-Emerald IV
October 14, 2014
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!