Quantcast
Channel: PTC Community : All Content - Windchill
Viewing all 6049 articles
Browse latest View live

Downloading EPM documents

$
0
0

From 10.1 version the download option for EPM has been removed by PTC. Here i'm trying to add an action which will execute the 'download action' ,   kindly review the java code and see if thats enough

 

 

 

package ext;

 

 

import java.io.*;

import java.util.*;

import java.rmi.RemoteException;

import java.net.URL;

 

 

import wt.util.*;

import wt.content.*;

import wt.epm.*;

import wt.fc.*;

import wt.query.*;

import wt.representation.*;

 

 

import wt.method.RemoteAccess;

 

 

public class dlRep

          implements RemoteAccess, Serializable

{

          private static String extractContent(EPMDocument EPMDoc, String dlLoc, String conType)

          {

                    String rtnStg="NO Data Found (extractContent)";

                    try {

                              Representation defaultRep=RepresentationHelper.service.getDefaultRepresentation(EPMDoc);

 

 

                              if(defaultRep != null)

                              {

                                        ContentHolder holder=ContentHelper.service.getContents(defaultRep);

                                        Vector contents=ContentHelper.getContentListAll(holder);

                                        ApplicationData data=null;

 

 

                                        for (int i=0;i<contents.size();i++)

                                        {

                                                  if (contents.get(i) instanceof ApplicationData)

                                                  {

                                                            data=(ApplicationData)contents.get(i);

 

 

                                                            if (data!=null && data.getFileName().endsWith(conType))

                                                            {

                                                                      if (dlLoc.equals("C:\shared")) {

                                                                                URL url = data.getViewContentURL(holder);

                                                                                String urlStg = data.getFileName()+"|C:\shared|"+url.toString();

                                                                                String mtData = ContentServerHelper.service.getMimeType(data);

                                                                                System.out.println("\ndata MimeType: "+mtData+"\n");

                                                                                System.out.println("\nurlStg (getViewContentURL): "+urlStg+"\n");

                                                                                return urlStg;

                                                                      }

                                                                      else {

                                                                                String path = dlLoc+"\\"+data.getFileName();

                                                                                rtnStg ="Download Step Executed To: "+dlLoc;

                                                                                ContentServerHelper.service.writeContentStream(data, path);

                                                                                System.out.println(rtnStg+".\n");

                                                                                return rtnStg;

                                                                      }

                                                            }

                                                  }

                                                  else {

                                                            rtnStg = "No App Data associated to current Object.";

                                                            System.out.println("\n"+rtnStg+"\n");

                                                            return rtnStg;

                                                  }

                                        }

                              }

                    }

                    catch(Exception exception)

                    {

                              exception.printStackTrace();

                    }

                    return rtnStg;

          }

 

 

          public static String getEPMDoc(String dlLoc, String drwNo, String conType)

          {

                    String rtnStg="NO Data Found (getEPMDoc)";

                    try

                    {

                              QuerySpec qs = new QuerySpec(EPMDocument.class);

                              qs.appendWhere(new SearchCondition(EPMDocument.class,EPMDocument.NUMBER,SearchCondition.LIKE, drwNo));

                              qs.appendAnd();

                              qs.appendWhere(new SearchCondition(EPMDocument.class, "iterationInfo.latest", "TRUE"));

                              System.out.println("Now Querying for Doc Using:\n " + qs.toString());

 

 

                              final QueryResult qr = PersistenceHelper.manager.find(qs);

 

 

                              while (qr.hasMoreElements()) {

                                        EPMDocument epmm = (EPMDocument)qr.nextElement();

 

 

                                        if (epmm.getNumber().endsWith(".DRW") || epmm.getNumber().endsWith(".CATpart") || epmm.getNumber().endsWith(".CATProduct")  ) {

                                                  System.out.println( "\nEPMDoc - Number: " + epmm.getNumber() + " - Name: " + epmm.getName()+ " - CadName: " + epmm.getCADName() );

                                                  System.out.println( " - Version: " + epmm.getVersionIdentifier().getValue() + " - Iteration:"+epmm.getIterationIdentifier().getValue()+"\n - Life Cycle State: "+epmm.getLifeCycleState().toString());

                                                  rtnStg = extractContent(epmm, dlLoc, conType);

                                                  return rtnStg;

                                        }

                              }

                    }

                    catch(Exception exception)

                    {

                              exception.printStackTrace();

                    }

                    return rtnStg;

          }

}


Workflow Task Differences Between 9.1 and 10.2

$
0
0

Why is the Process Name added to the task name?  This causes unnecessary clutter.  It seems like this should be a preference to turn on or off, but when I opened a PTC case about it, they gave me a custom java file to put into /codebase/... and compile it as a work-around.  The case has currently been passed up the chain a little bit, and also sent to the Customization team of PTC Support.

 

Is it seriously a customization to remove this back out?  If this was introduced, it should've been introduced with the option to turn it off.  I don't understand why some people might want to see it.

 

1.png

2.png

3.png

How to sort the script error issue ?

$
0
0

How to sort the script error issue ?

MPMLink and Nested Process Plan Best Practice

$
0
0

Hello.

 

Does anyone have Best Practice documents willing to share?  brian.sullivan@tristar.com

 

Trying to minimize amount of Work for the Manufacturing Engineer

 

MBOM to Process Plan to Work Instructions.

The MBOM can have Variants created using Option &Variants.  Which really means that the Generic MBOM is Saved as a Subset of the Data under a New MBOM.

 

The MBOM is comprised of self container modules; which could each have a standard Process Plan and thus Work Instruction.

 

CAN I make Top Level MBOM Process Plan that Builds the Process Plans from the child Modules? 

 

Wondering is anyone has documented the Technique Manually or with Options and Variants?

 

Do not want to Lose Part Allocations...

 

Brian Sullivan

Administrators unable to create instantiable Document sub-type even with proper Access Control defined (Windchill PDMLink 10.0 M040)

$
0
0

Any user, even Administrators, with Create access to a WTDocument sub-type is unable to see the sub-type in the Document Creation Wizard drop-down list. (Windchill PDMLink 10.0 M040)

Save file dialog from ObjectFormProcessor

$
0
0

Hi.

is it possible to return save file dialog from ObjectFormProcessor ?

What is windchill soultion for this problem ?

I use  jasperrepors to generate *.xls. How to save it on client side?

Thanks.

Find EPMDescribeLink by EPMDocument and WTPart

$
0
0

Hi.

How can i find EPMDescribeLink between specific versions of EPMDocument and WTPart?

For example, epmDocument A.2 linked with wtPart versions A.2 and B.1.

I need to delete link with B.1 version.

Thanks.

Frustrated with Windchill

$
0
0

I so want to do certain 'basic' things in Windchill that I don't seem to be able to manage.  I've been trying to learn Windchill; but, 3rd party books are scant (if they exist at all).  And I don't have the small fortune required to negotiated PTC University.  The online Help is atrocious.  I simply want to be able to add an attribute (create a new attribute) for (or within) an existing document, e.g. a reference document with no content, and I want to be able to search (advanced search) to be able to produce results on a single keyword found in the content of the attribute created for that document.  For example, I want an attribute titled "Capability Study Notes" for some manufactured part, and I want to be able to search through all parts that have that created attribute, for a created reference document, that contain the word "cpk result."  Is this not possible in Windchill?  Is there some way that this can be managed that just isn't possbile on the intuitive level in Windchill?  (I don't seem to have the ability to add attributes to anything in Windchill.  There's no option available to do so, in what I'm able to discern.)  Is there any online content that describes how to produce the results that I'm looking for?  I subscribe to Scribd; but, I have found nothing there that answers this particular question.  I'll take any insight into this, even if it is delivered pejoratively.  Please help!!!  Thanks!


Add a specific document type or "Customize View" in my custom table.

$
0
0

Friends,

 

I need to adda specificdocument typein mycustom table. I believe thatadded"Custom View"I can put afilter anditwould solve.

 

custom menu.jpg

 

Couldyou help me?Mytable iswith the following code:

 

@Override

public ComponentConfig buildComponentConfig(ComponentParams componentParams)

  throws WTException {

   ComponentConfigFactory factory = getComponentConfigFactory();

   TableConfig table = factory.newTableConfig();

   table.setLabel("Lista dos Fornecedores");

   table.setView("/../../netmarkets/jsp/t3827/tableFornecedor.jsp");

   table.setType("wt.pdmlink.PDMLinkProduct");

   table.setSelectable(true);

   table.setShowCustomViewLink(false);

   table.setShowCount(true);

   table.setSingleSelect(false);

   table.addComponent(factory.newColumnConfig("number", true));

   table.addComponent(factory.newColumnConfig("name", true));

   table.setMenubarName ("forntablemenubar");

   return table;

 

Thank you.

Felipe.

Broken view dimensioning

$
0
0

Dear all,

 

pfa

 

Help me to show the broken view dimension as it is marked in the attachement.

 

Regards,

Samson.

Define workflow stage by java code

$
0
0

Hi.

Is it possible to define what workflow stage object is at?

I have WTPart soft type with specified workflow. I need to make some menu actions for this object available only on certain assigned activity.

How can i define by java code whether my object reached this stage in workflow?

Thanks.

Database table in which WTPart or Change activity Maturity History is stored.

$
0
0

I need to pull the date on which a WTPart was in inwork state or a CN was in published state. I did my analysis and found that there should be a Maturity history table in database, but i ended up with a table called MaturityBaseline table which does not hold this information. I need guidance on which table this information is stored. Even in API com.ptc.windchill.enterprise.history.HistoryTablesCommands.maturityHistory(wtObject); so it is expect there should be a Maturity history table in database.

How to export where used report in MS Excel format?

$
0
0

Hello folks,

 

Can anybody tell me how to export where used report in MS Excel format in windchill PDMlink?

I searched a lot for this option but couldn't find.

 

Thanks,

Kiran

Windchill - Web Browser Error - Script issue

$
0
0

I am trying to open a work space that I have been using for some very large files.  I am almost done with my project but I needed to check out another assembly.  When I go to my workspace to rev and check out the files I need, I get a running script error.  Has this happened to anyone else?  Does any one know a correction for it?  or perhaps preventative? 

Thanks in advance,

Diane

Setting Default template while wtdocument creation in OOTB wizard

$
0
0

Friends,

 

I have some templates for WTDocument.

I want to set one particular template as the OOTB instead of "<--Select a Template-->", which is always shown as default.

 

Is there a way? I tried with OIR, but was not able to nail this down.

 

Thanks,

Ravin


Where used

$
0
0

Is there a "where used" tab in PDM Essentials like there was in Intralink?

Search For Objects - Someone's WS on the server-side

$
0
0

Is there a way I can see if an object is checked out or created in someone else’s WORKSPACE without admin privilege?

 

I am getting the FILENAME conflict and the object does not exist in any of my WORKSPACEs or in Windchill cabinet.  I know the admin can search the object and pin point who has the same object name in their WORKSPACE. 

 

Thank you in advance!

 

Calvin

Query Builder Report: getting the related Promotion Requests of a Drawing

$
0
0

Hi,

 

I am searching for a Query Builder Report definition to get informations of Promotion Requests that have collected specific Drawings (EPMDocuments).

With other words: the search criteria should be the EPMDoc's Number and the result should be the Number (and some additional infos like Status) of every Promotion Request where this EPMDoc is a part of.

 

I found this report which I try to modify to add a connection to EPMDocuments but I don't know what tables and joins are necessary.

https://support.ptc.com/appserver/cs/view/case_solution.jsp?n=CS112325&lang=en

 

Can you help me?

Thanks!

David

Do you use Project Link for Project & Program Management?

$
0
0

We use PDMLink and ProjectLink, but so far our ProjectLink use is only for document sharing, not for task & resource management.  I am looking for someone in the Windchill community doing using ProjectLink for managing tasks and resources for project and/or programs in order to find out more about your experience using ProjectLink for that purpose.

 

Please reply if you use ProjectLink, and indicate if you only use it for document sharing, like us, or if you use ProjectLink for project managements.  If you use ProjectLink for project management, please share your overall impression of ProjectLink as a tool for that purpose, especially regarding resource management.

 

We have a requirement to manage engineering resources across multiple engineering projects for programs and projects such as NPI projects, and product changes. I am trying to find out if others have found ProjectLink useful for this type of purpose.

 

Regards,

 

Al Anderson

Solar Turbines Incorporated

Windchill Client Architecture Tree

$
0
0

Hi.

I have a problem with tree in wizard.

My wizard contains tables on 1-st and 2-nd steps and tree on 3-rd. Tree is created from objects selected on 1-st and 2-nd steps (i can get them by NmCommandBean.getNmOidSelected() method).

The first invocation of wizard works fine.

On second and others TreeHandlerAdapter does not work. The NmCommandBean.getNmOidSelected() returns empty list, and TreeHandler.getRootNodes() is not invoked at all?

How can this problem be solved?

Thanks.

Viewing all 6049 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>