Skip to main content
1-Visitor
May 11, 2010
Question

Drawings as PDF - Quick way to download them?

  • May 11, 2010
  • 95 replies
  • 33906 views
I have my drawings being published as a PDF by my Pro/e CAD worker. This is fine but in the end my users really need to be able to quickly download or email the PDF. Currently the only way to get the PDF out is to do the following:
1- Go to Drawing Details Page
2- Select "Display Representations List"
3- Click Actions>Save Representation
4- Save Representation out as .zip file to desktop
5- Extract PDF from .zip file and email etc

WAY to much work...does anyone know of a more efficient way to do this?

95 replies

1-Visitor
October 22, 2010

Some one emailed me directly & mentioned that their install of this tool, didn't follow their ACL permissions.

I guess I assumed the ACL for download would control who could & could not use this tool, so I didn't dig into writing code (jsp/class) that would check for download access. As I mentioned before, this was all on free time & my vmwares are lacking the real production users, acl, etc to replicate & test a real production scenario.

So what I would like to question/request from those knowledgeable in this area, what method is best to remedy this situation.

I imagine I could write jsp/class to check permissions, but that could be lengthy & messy. But what methods does Windchill use to keep the action menu options from being seen by the wrong users. It seems to do very well at hiding action menu options from particular logins (acl permissions). What route does it use. I have scanned a few docs/guides, but its does not seem to stand out.

I can look longer/harder, but sometimes some one has it off the top of there head here in the ptc forums.

Might it be in the actions & actionModels xml files. Where the type of menu option is exclaimed:

<actionmodels>
<model name="epmdocuments" details=" page=" actions&quot;=" menufor="wt.epm.EPMDocument">
...
<action name="WFDOWNLOAD"" type="epmdocument"/">
...
<action name="create"" type="changeRequest"/">
...
<action name="MULTI_OBJ_DELETE"" type="pdmObject"/">
...
<action name="listRepresentations"" type="wvs"/">
...
</actionmodels>

does the type (epmdocument, changeRequest, wvs or pdmObject) control what ACL permissions are applied?

If so, I hope its applied in the custom actions xml's area also.

If this is the case, then the way I placed/used the type with this tool, might be causing issues:

<action name="REPSAVEAS"" type="repsave"/">

If this is the case, can I add "repsave" to some properties or ?? file, so windchill will view it as a wvs, epmdocument, etc & therefore apply the proper ACL permissions.

Or should I change the type to wvs/epmdocument, in order to put it under the same acl control of those particular types.

If so, I would then have to place the jsp in a different jsp folder:

<wt_home>\codebase\wtcore\jsp\wvs or epmdocument, etc.

It would be nice if I could just add repsave to a properties file & then ACL permissions would be applied property.

Any ideas/thoughts about the quickest, but most proper method to do this.

L Jett
cadjett@aol.com;datajett@aol.com (main email)

1-Visitor
October 22, 2010
I should be publishing a sophisticated action filter add on for free in the near future.

The customizer's guide tells you how to write these using UIValidationStatus.HIDDEN.

You can search the pdf for reference to it.

The most basic control is to lock it for all users and allow only a certain role. In your actions XML, define a unique uicomponent attribute and then edit roleaccessprefs.xml

You will have to bounce server and then going to profiles or likely each context team minor tab page and select configure actions for roles. From that popup UI, your custom action appear giving you ability to allow the action to only be visible for a certain role.

The one I'll be publishing will be 1000 times more flexible. It will allow you to grant access to an action based on any combination you think like soft attrubte values, pending changes, soft types, lifecycle templates, folder, folder atts, product, product types/atts, roles, groups, version, iteration, and more.

Outside of actions, you would have to use AccessControlHelper hasAccess methods.


David DeMay


Sent from my Verizon Wireless BlackBerry
1-Visitor
October 22, 2010

This looks to be exactly like what I need

Of course I will have to get familiar with the areas you mention & my vmware is down, since I am on the road AGAIN. But as soon as I can, I will play around with the areas in your comments.

The only thing I might not do it block usage from all users (except for one), because I want to make it to where most any designer can download a pdf to send to a vendor. Not force it into an admin or special usertask.

But also resctrict access to those that dont have download, etc permissions (like vendors, etc).

Then some that want external vendors to be able to (so they dont have to be emailed thepdfto them), would just have to adjust ACL's on their account.

But it looks to be good stuff & I cant wait to jump into it & adjust my code &/or show what access xml edits to preform to limit usage of the menus &/or apps.

Thanks
L Jett

8-Gravel
December 15, 2010

Larry,

I am trying to implement this and I'm getting the following errors:

actionmodels.xml file is missing an entry called header_actions. Please add the model and restart the server.
actionmodels.xml file is missing an entry called home_assignments_actions_toolbar. Please add the model and restart the server.
actionmodels.xml file is missing an entry called updatelist_actions. Please add the model and restart the server.
actionmodels.xml file is missing an entry called checkoutlist_actions. Please add the model and restart the server.

Have you seen this error before? I used the zip file dated August 11, 2010 and your readme file dated Sept. 25, 2010. Any help would be greatly appreciated.

Regards,

Adam

1-Visitor
December 16, 2010
Did you validate the XML syntax is valid? Those are all core action models
and it sounds as if Windchill is not able to parse the XML correctly. No
parse exception in log files?




8-Gravel
December 16, 2010

Dave,

Thank you for your repsonse. I do see the following line in the logs but there is no stack trace or further information:

main: [Fatal Error] :11:2: The markup in the document following the root element must be well-formed.

I'm using the attached readme file. I am a bit confused as to what goes into the file custom-actions.xml however I think the error is possibly with the custom-actionModels.xml.

It might also be important to know we are running 9.1 M050.

-Adam

1-Visitor
December 17, 2010

Hello Adam,

I dont have my windchill vmware available right now, but from memory I will try.

The error code looks like one of a couple possibilities:

1) There is an error in your readme file (otherwise old error in my file):

It has:

Copy Content below & paste to:

<wt_home>\codebase\config\actions\custom-actions.xml

com.ptc.windchill.enterprise.wvs.WVSactionsResource



<listofactions>
<objecttype name="repsave" class="wt.epm.EPMDocument" resourcebundle="com.ptc.windchill.enterprise.wvs.WVSactionsResource">
<action name="REPSAVEAS">
<description>Download DRW PDF or PLT</description>
<command windowtype="popup"" url="wtcore/jsp/repsave/REPSAVEAS.jsp"/">
</action>
</objecttype>
</listofactions>

8-Gravel
December 20, 2010

Thanks for your help. I was able to get thisworking with the new readme file. Initially it was giving me some fits but after I cleared tomcat cache and compliedTasks it appears to be running brilliantly. Thanks again and Happy Holidays!

Regards,

-Adam

1-Visitor
February 22, 2011

Hello all-

I am having a problem with this not retrieving the latest version of the PDF. If I use the Download PDF link it pulls a different version then the one that I am looking at. My batch File that creates all the PDFs is a different version then the current and from what is in the Download PDF Link. Is there a way to make sure it us pulling the latest? If I look at the List of Representations that one is correct.

.

1-Visitor
February 23, 2011
Well the config spec gurus might know better than I.

As far as I know, with the java classes the jsp uses, Its grabbing the pdf that is associated to that specific DRW & its rev.

But there might be system setting forsome config spec that forces which pdf ver to pull.

Whether is be latest or other.

Then again, maybe the alternate method you are speaking of, uses the system config spec, where my program/classmight not.

Any ideas, from the guru gallery?

L Jett
cadjett@aol.com;datajett@aol.com