永久域名http://jeans.javaeye.com Permanent domain name http://jeans.javaeye.com
2008 - 06 - 27 2008 - 06 - 27

文件格式類型轉換 The type of file format conversion

关键字: 文件格式類型轉換 Keyword: the type of file format conversion

文件格式類型轉換 The type of file format conversion
Example:
1. txt-->>text/plain-->>Text File 1. Txt ->> text/plain-->> Text File
2. doc-->>application/msword-->>Microsoft Word. 2. Doc ->> application/msword-->> Microsoft Word.

具體實現步驟: Concrete steps to achieve:
1. 讀取ApacheMime類型,并將其存入Properties,位置Apache_Home\conf\mime.types 1. ApacheMime read type, and deposited Properties, the location Apache_Home \ conf \ mime.types
其截取部分內容如下: Its interception in part as follows:

  # This is a comment. I love comments. # This is a comment. I love comments. 

  # This file controls what Internet media types are sent to the client for # This file controls what Internet media types are sent to the client for 
  # given file extension(s).  Sending the correct media type to the client # Given file extension (s). Sending the correct media type to the client 
  # is important so they know how to handle the content of the file. # Is important so they know how to handle the content of the file. 
  # Extra types can either be added here or by using an AddType directive # Extra types can either be added here or by using an AddType directive 
  # in your config files. For more information about Internet media types, # In your config files. For more information about Internet media types, 
  # please read RFC 2045, 2046, 2047, 2048, and 2077.  The Internet media type # Please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type 
  # registry is at <http://www.iana.org/assignments/media-types/>. # Registry is at <http://www.iana.org/assignments/media-types/>. 

  # MIME type   Extensions # MIME type Extensions 
  application/activemessage application / activemessage 
  application/andrew-inset ez application / andrew-inset ez 
  application/applefile application / applefile 
  application/atom+xml  atom application / atom + xml atom 
  application/atomicmail application / atomicmail 
  application/batch-smtp application / batch-smtp 
  application/msword  doc application / msword doc 


2. 傳入文件后綴作為key值獲取其對應的MIME type,通過一方法將key,value轉換 2. Suffix as a key document into the value of their access to the corresponding MIME type, a method will be adopted by the key, value conversion

     public static String getKeyByValue(Hashtable hash,String value){ public static String getKeyByValue (Hashtable hash, String value) ( 
         String key=""; String key = ""; 
         String tempValue=""; String tempValue = ""; 
         Enumeration keys=hash.keys(); Enumeration keys = hash.keys (); 
         while(keys.hasMoreElements()){ while (keys.hasMoreElements ()) ( 
             key=(String)keys.nextElement(); key = (String) keys.nextElement (); 
             tempValue=(String)hash.get(key); tempValue = (String) hash.get (key); 
             if(tempValue.indexOf(value)>-1) if (tempValue.indexOf (value)> -1) 
              break; 
         } ) 
         return key; return key; 
     } ) 

3. 根據mime type轉換為文檔類型(借助Windchill平臺) 3. According to the mime type is converted to document type (with Windchill platform)

  QueryResult qr = ContentHelper.service.getDataFormats(); QueryResult qr = ContentHelper.service.getDataFormats (); 
  while(qr.hasMoreElements()){ while (qr.hasMoreElements ()) ( 
   DataFormat f = (DataFormat)qr.nextElement(); DataFormat f = (DataFormat) qr.nextElement (); 
   if(mimetype.equals(f.getMimeType())) if (mimetype.equals (f.getMimeType ())) 
    return f.getFormatName(); return f.getFormatName (); 
  } ) 

2008 - 06 - 20 2008 - 06 - 20

关于“策略管理器”中对应的对象 "Policy Manager" in the corresponding object

关键字: windchill access Keyword: windchill access

WTProductInstance2 成品实例 Examples of products WTProductInstance2
WTProductConfiguration 成品配置 WTProductConfiguration product configuration
WTPartSubstiuteLink 零部件与替代件的连接 WTPartSubstiuteLink replacement parts and pieces of the connector
WTPartConfigSpec 零部件配置规范 WTPartConfigSpec parts configuration specification
WTPartAlternateLink 零部件与备用件的连接 WTPartAlternateLink parts and components and spare parts to connect the
WTMarkUp 表示法 WTMarkUp representation
WTDocumentConfigSpec 文档配置规范 WTDocumentConfigSpec configuration files norms
WTChangeProposal 变更提议 WTChangeProposal changes proposed
WTChangeIssue 变更事项 WTChangeIssue changes
StructuredAnnotationSet 产品结构注释 StructuredAnnotationSet product mix Notes
ManagedBaseLine 基线 ManagedBaseLine baseline
IndependentNode 浏览结构中独立的分类节点 IndependentNode view of the structure of the classification of independent node
IndependentNavStruct 浏览结构中独立的分类结构 IndependentNavStruct view of the structure of an independent classification structure
ExchangeContainer容器 ExchangeContainer containers
EPMDocConfigSpec CAD文档配置规范 EPMDocConfigSpec CAD file allocation norms
DirectQueryTarget 查询对象 The target DirectQueryTarget inquiry
DefaultQueryForm 浏览结构中的缺省查询表单 DefaultQueryForm the default browser in the structure of the inquiry form
ClassficationStruct 分类结构 ClassficationStruct classification structure
ClassficationNode 分类节点 ClassficationNode node classification
ClassficationNavStruct 分类浏览结构 ClassficationNavStruct classification structure of the browser
AttributeOrganizer 属性组织 AttributeOrganizer Property Organization
AdministrativeDomain 管理域 AdministrativeDomain domain management
AccessPolicyRule 访问控制规则 AccessPolicyRule Access Control Rules

2008 - 06 - 17 2008 - 06 - 17

启动两个MethodServer The two start MethodServer

关键字: windchill pdm plm 二次开发server Keyword: windchill pdm plm second development server

安装指南p165(17-4)上说: Installation Guide p165 (17-4), said:
xconfmanager -s wt.manager.monitor.start.MethodServer=2 -t /codebase/wt.properties -p xconfmanager-s wt.manager.monitor.start.MethodServer = 2-t / codebase / wt.properties-p

如果CPU和内存足够,一般配置多个MethodServer。 If sufficient CPU and memory, the general allocation of more than MethodServer.
服务器上一般都至少配置1~2个MethodServer+1个BackgroundMethodServer。 Server configuration is generally at least 1 to 2 MethodServer +1 000 BackgroundMethodServer.
启动多个MethodServer,对于并发用户请求较多时,可以分开并行处理,以提高系统性能。 Start a number of MethodServer, the request for more concurrent users, parallel processing can be separated in order to improve system performance.
流程是通过队列来处理的,如果有配置BackgroundMethodServer,都是由BackgroundMethodServer来进行处理,不会出现接到两个系统任务的想象。 Through the process to deal with the queue, if configured BackgroundMethodServer, by BackgroundMethodServer to deal with, the two systems will not be receiving the mandate of the imagination.
在WCPerfTuningGuide_zh_CN.pdf手册中有比较详细的说明。 WCPerfTuningGuide_zh_CN.pdf manual in a more detailed explanation.

请问开一个methodserver OS层级需要多大的内存,它本身的内存最好调成多大的。 I would like to ask methodserver OS to open a much needed level of memory, it's the best memory of the little tune into. 两个methodserver OS层级需要多大的内存。 Two methodserver OS-level needs much memory. 我们的Background Server和DB是分开的,都是4G的内存,3.0G*4的CPU,要么我们的的methodserver可以开几个? Our Background Server and is separate from the DB are 4G of memory, 3.0G * 4 of the CPU, or we can open several of methodserver?

如果有4个CPU,建议可以配置1~2个MethodServer和1个BackgroundMethodServer。 If there are 4 CPU, the recommendations can be configured from 1 to 2 MethodServer and a BackgroundMethodServer.

服务器上1个MethodServer一般配置1G~2G内存,但要保证所有的服务(MethodServer, ServerManager, JDK, Tomcat, Apache, Aphelion...)所配置的内存总和要小于物理内存。 A server configuration MethodServer general 1G ~ 2G memory, but to ensure that all services (MethodServer, ServerManager, JDK, Tomcat, Apache, Aphelion ...) the allocation of memory to be less than the sum of physical memory.

其中Tomcat也是需要配置较高内存的,一般也需要1~2G。 Tomcat is also a need for one more memory allocation, the general need to 1 ~ 2G.
其它的一般不需要太多内存。 Other general do not have too much memory.

我们的硬体架构是一台Server装Aphelion,两台AP,一台DB,一台background methodserver,那么我们的background methodserver可以开几个method server。 Our hardware architecture is a Server installed Aphelion, two AP, a DB, a background methodserver, then we can open the background methodserver several method server.

“两台AP”是安装Apache、Tomcat、ServerManager和MethodServer吗? "Two AP" is the installation of Apache, Tomcat, ServerManager and MethodServer it? 怎么分布的? How the distribution?
background methodserver一般只需要一个,可以配置多个队列同时进行处理。 General background methodserver only need one, can be configured to process more than queue at the same time.

2008 - 06 - 17 2008 - 06 - 17

IBA属性存取问题 IBA access to attribute the problem

关键字: windchill pdm plm 二次开发iba Keyword: windchill pdm plm second development iba

1)建立IBA属性后,该实例数据库的结构也自动更新么? 1) the establishment of IBA Properties, the example of the structure of the database automatically updates you? 是否包含这些IBA属性。 These attributes include whether the IBA. 我之前是一直在ROSE下建模,并用SQL语句建库。 Before I was always under the ROSE modeling, and SQL database statement.

2)对这些IBA属性的操作如保存、删除、更新、读取等,该如何进行? 2) IBA these attributes, such as the preservation of the operation, delete, update, read, and so on, how to carry out?

3)我刚接触IBA,还不太清楚它的工作机制,能否简单介绍一下。 3) I Gangjie Chu IBA, it's not yet clear working mechanism, can give a brief account.

建立IBA属性后,数据库的结构并不会改变,而只是数据库中的数据变化而已。 IBA-building properties, the structure of the database does not change, but change the data in the database only.

IBA属性并不是作为文档、零件等对象表中的字段,所以也称为软属性。 IBA is not as a document attributes, such as parts of the object in the table field, so called soft attributes.
否则,每个零件都有不同的属性,可能有几百甚至上千个属性,那零件对象数据表岂不是要上千个字段,而每条记录(每个零件)却只需要填写几个属性,这就造成大大浪费。 Otherwise, each of the parts have different attributes, there may be hundreds or even thousands of properties, and that parts object data tables are they going to pay thousands of fields, and each record (each of the parts) are required to complete only a few Property, which resulted in much waste.

在Windchill中,IBA属性的定义和值都是单独保存在各自的表中,而且每种类型的IBA属性还保存在各自不同的表中。 Windchill in China, IBA and the definition of property value are preserved in their own separate table, and each type of property IBA is also stored in different table.
如: Such as:
StringDefinition,字符串类型的IBA属性定义 StringDefinition, string types of attributes defined IBA
StringValue,字符串类型的IBA属性值 StringValue, string types of property value IBA
FloatDefinition,浮点数类型的IBA属性定义 FloatDefinition, floating point types of attributes defined IBA
FloatValue,浮点数类型的IBA属性值 FloatValue, floating point types of property value IBA

在IBA属性定义表中,包含属性定义id,内部名称,显示名称,描述等; IBA attributes defined in the table, including the definition of property id, internal name, display name, description, and so on;
在IBA属性值表中,包含对象id,属性定义id,属性值; IBA in property values in the table, including the object id, the definition of property id, property values;

这样,系统要获取某个对象的IBA属性时,根据该对象的id从属性值表中可以获得属性定义id和属性值,根据属性id从属性定义表中获得属性显示名称。 In this way, the system must obtain an object's attributes IBA, according to the object of the id attribute values from the table attributes can be defined and the id attribute value, according to the id attributes from the attribute definition table shows the name of access to property.

2008 - 06 - 16 2008 - 06 - 16

Windchill怎么进行自动备份 Windchill how automated backup

关键字: windchill pdm plm 二次开发备份 Keyword: windchill pdm plm backup secondary development

1. back.bat文件內容(備份數據及停止ILINK服務) 1. Back.bat content of the document (and data backup services to stop ILINK)
@ECHO OFF @ ECHO OFF
SET ILINK_DRV=d: SET ILINK_DRV = d:
SET ILINK_DIR=\ptc SET ILINK_DIR = \ ptc
SET BACK_DRV=e: SET BACK_DRV = e:
SET BACK_DIR=\model_file\ptc_backup SET BACK_DIR = \ model_file \ ptc_backup

%ILINK_DRV% % ILINK_DRV%
CD %ILINK_DRV%%ILINK_DIR%\fileserver3.4\bin\ CD% ILINK_DRV%% ILINK_DIR% \ fileserver3.4 \ bin \
call fserv_shutdown.bat call fserv_shutdown.bat

%BACK_DRV% % BACK_DRV%
CD %BACK_DRV%%BACK_DIR%\ CD% BACK_DRV%% BACK_DIR% \

FOR /F "TOKENS=1,2,3,4 DELIMS=/ " %%I IN (DATE.TXT) DO @SET YESTODAY=%%I%%J%%K FOR / F "TOKENS = 1,2,3,4 DELIMS = /"%% I IN (DATE.TXT) DO @ SET YESTODAY =%% I%% J%% K
RMDIR/S/Q %YESTODAY% RMDIR / S / Q% YESTODAY%
DEL DATE.TXT DEL DATE.TXT

IF EXIST DATENEW.TXT DEL DATENEW.TXT IF EXIST DATENEW.TXT DEL DATENEW.TXT
DATE /T > DATENEW.TXT DATE / T> DATENEW.TXT
FOR /F "TOKENS=1,2,3,4 DELIMS=/ " %%I IN (DATENEW.TXT) DO @SET TODAY=%%I%%J%%K FOR / F "TOKENS = 1,2,3,4 DELIMS = /"%% I IN (DATENEW.TXT) DO @ SET TODAY =%% I%% J%% K
MKDIR %TODAY% MKDIR% TODAY%
call %ILINK_DRV%\%ILINK_DIR%\dataserver\intralink\export\ilink_export manager %BACK_DRV%\%BACK_DIR%\%TODAY%\data_bak.dmp call% ILINK_DRV% \% ILINK_DIR% \ dataserver \ intralink \ export \ ilink_export manager% BACK_DRV% \% BACK_DIR% \% TODAY% \ data_bak.dmp
%BACK_DRV% % BACK_DRV%
CD %BACK_DRV%%BACK_DIR%\ CD% BACK_DRV%% BACK_DIR% \
REN DATENEW.TXT DATE.TXT REN DATENEW.TXT DATE.TXT

%ILINK_DRV% % ILINK_DRV%
CD %ILINK_DRV%%ILINK_DIR%\dataserver\intralink\bin\ CD% ILINK_DRV%% ILINK_DIR% \ dataserver \ intralink \ bin \
call dbshut_ilink.bat call dbshut_ilink.bat


2.開始同步軟體備份文件到另一台電腦上 2. Synchronization software began to back up files to another computer

3. svrstat.bat文件內容(啟動INLINK服務) 3. Svrstat.bat content of the document (to start services INLINK)
@ECHO OFF @ ECHO OFF
SET ILINK_DRV=d: SET ILINK_DRV = d:
SET ILINK_DIR=\ptc SET ILINK_DIR = \ ptc

%ILINK_DRV% % ILINK_DRV%
CD %ILINK_DIR%\dataserver\intralink\bin\ CD% ILINK_DIR% \ dataserver \ intralink \ bin \
call dbstart_ilink.bat call dbstart_ilink.bat
CD %ILINK_DIR%\fileserver3.4\bin\ CD% ILINK_DIR% \ fileserver3.4 \ bin \
call fserv_startup.bat call fserv_startup.bat

是不是可以根据这个的形式做? This may not be in the form of the same? 那LDAP的导出呢? That the LDAP export it?

LDAP一般采用冷备份,也就是备份整个目录。 LDAP generally cold backup, that is to back up the entire directory.

冷备份? Cold backup? 整个目录? The entire directory? 那不是把APACHELION这个给COPY下来就可以了(操作前先在服务里停止服务)? That is not to APACHELION to the can down the COPY (before the operation to stop the service, service)?

是的。 Yes. 就是复制Aphelion整个目录即可 Aphelion is to copy the whole directory can be

备份的目的,是为了恢复。 The purpose of backup is to resume.

针对Aphelion的恢复,重装程序,然后把数据文件覆盖过去,就OK了。 Aphelion for the recovery, re-process the data files and then covered in the past, it has been OK.

这个不同于Windchill程序的COPy。 Windchill is different from the procedures COPy.

Windchill 8.0 中设计数据的备份方法 Windchill 8.0 in the design of the data backup method

一般采用冷备份,即使用Oracle的exp命令导出数据库用户的所有数据。 General cold backup, that is, to use Oracle's database exp export orders data for all users.
恢复时使用imp导入,这与Pro/INTRALINK的备份是类似的。 To restore the use of import imp, with Pro / INTRALINK backup is similar.

但Windchill同时还需要备份LDAP的数据,如果有配置电子仓库,同时还需要备份电子仓库的数据(相当于Pro/INTRALINK的FileValut)。 Windchill, but also need to back up the LDAP data, if there is to configure electronic storage, as well as the need to back up electronic data storage (the equivalent of Pro / INTRALINK the FileValut).

2008 - 06 - 16 2008 - 06 - 16

控制AutoCAD图纸检入时是否自动创建零件 AutoCAD drawings seized control whether or not automatically create a fashionable parts

关键字: windchill pdm plm 二次开发cad Keyword: windchill pdm plm second development cad

在/ptc/Windchill/codebase/wmautocad/wtcad.ini文件中有如下定义: In / ptc / Windchill / codebase / wmautocad / wtcad.ini document has the following definition:
...
create.part.attribute.name=CREATE_PART create.part.attribute.name = CREATE_PART
create.part.attribute.value.true=true create.part.attribute.value.true = true
create.part.attribute.value.false=false create.part.attribute.value.false = false
...

其中create.part.attribute.name定义的属性可以用来控制检入AutoCAD图纸时在PDMLink系统中是否自动创建零件。 Create.part.attribute.name the definition of which can be used to control the properties of the check-in AutoCAD drawings at the PDMLink system automatically create parts.
CREATE_PART为PDMLink系统中EPMDocument的属性,需要在AutoCAD模板定义一个属性,并在wtacad.map文件定义属性的映射。 CREATE_PART for PDMLink system EPMDocument attributes necessary to define a template AutoCAD attributes, and attribute definition wtacad.map document mapping.

create.part.attribute.value.true用于定义CREATE_PART属性的值,按以上定义,当CREATE_PART属性的值为“true”时,系统将自动创建零件,当属性值为“false”时,系统将不自动创建零件,只创建CAD文档。 create.part.attribute.value.true for CREATE_PART the definition of property value, according to the above definition, when CREATE_PART property value "true", the system will automatically create a spare parts, when property values are "false", the system will not be Auto-parts to create only the creation of CAD documents.
为了输入方便,可以更改设置为: To enter, it can change the settings as follows:
create.part.attribute.value.true=Y create.part.attribute.value.true = Y
create.part.attribute.value.false=N create.part.attribute.value.false = N
在模板中设置缺省值设置为“Y”,系统自动创建零件,如果不需要创建,则更改其值为“N”即可。 In the template to set default values set to "Y", the system automatically create a spare parts, If you do not need to create, change the value of "N" can be.

按系统缺省设置,将自动创建零件,无需进行特殊设置 System set up by default, will automatically create a spare parts, without the need for special settings

以上在PDMLink 8.0 M020+AutoCAD 2004简体中文版上测试通过 More than PDMLink 8.0 M020 + AutoCAD 2004 Simplified Chinese version of the test

2008 - 06 - 16 2008 - 06 - 16

Windchill_8.0系统自动启动 Windchill_8.0 system automatically

关键字: windchill pdm plm 二次开发methodserver Keyword: windchill pdm plm second development methodserver

方案一、 One program,
1、创建一个批处理文件wtStart.bat(名称可以自取)。 1, to create a batch file wtStart.bat (name can be self). wtStart.bat的内容如下: wtStart.bat of which reads as follows:
echo start Windchill echo start Windchill
set WT_HOME="c:\ptc\Windchill_8.0" set WT_HOME = "c: \ ptc \ Windchill_8.0"
start c:\ptc\Apache\bin\Apache.exe start c: \ ptc \ Apache \ bin \ Apache.exe
call c:\ptc\tomcat5\bin\wttomcat_start.bat call c: \ ptc \ tomcat5 \ bin \ wttomcat_start.bat
call c:\ptc\Windchill_8.0\bin\infoengine\startnamingservice.bat call c: \ ptc \ Windchill_8.0 \ bin \ infoengine \ startnamingservice.bat
start c:\ptc\Windchill_8.0\bin\windchill.exe start start c: \ ptc \ Windchill_8.0 \ bin \ windchill.exe start
echo Windchill is starting echo Windchill is starting
2、然后,将其存放的路径添加到注册表中(HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run 或者 2, and then, to add to the path of the stored in the registry (HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Run or
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run) HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run)

方案二、 Second program,
将其做成Wondows系统的服务。 Wondows make its system. 以Windows 服务方式运行Windchill。 Windows service to run Windchill.
执行下列命令可将Windchill 配置为以Windows 服务方式运行。 The following command can be configured to Windchill in order to run Windows services. 执行命令时会自动启动该服务。 Implementation of the order is automatically activated when the service.
从Windchill 外壳程序,输入: Windchill from the shell, enter:
ant -buildfile  \opt\ntservice\WindchillService.xml install ant-buildfile \ opt \ ntservice \ WindchillService.xml install
-DserviceName= -DserviceName =
其中< 服务名称> 是引用该服务的唯一名称(例如WTService)。 One <name of the service> is the only reference to the name of the service (for example, WTService).
现在可以从Windows 服务实用程序管理(例如,启动和停止) Windchill。 Now from the Windows utility services management (for example, start and stop) Windchill.
该名称列在您在上述命令中提供的名称(即< 服务名称>)下面的实用程序中。 The names are listed in the order you provide the name (that is, <name of the service>) in the following utility.

2008 - 06 - 16 2008 - 06 - 16

逐层取得一产品结构下的部件名/编号/层次号 Step by step to obtain a product mix of components under the name / code / level,

关键字: windchill pdm plm 二次开发bom Keyword: windchill pdm plm second development bom

例如有一产品结构 For example, a product mix

A下有两个子部件A1和A2,A1下面有A11和A12,A2下面有A21和A22 A two sub-components under the A1 and A2, A1 and A11 have the following A12, A2 and A21 have the following A22

现在我想用代码取得如下结构(A 是第1层) Now I would like to use the following code to obtain the structure (A-1)

编号  部件名称  层次 Code name of the components level

A       A1             2 A A1 2

A       A2             2 A A2 2

A1    A11            3 A1 A11 3

A1    A12            3 A1 A12 3

A2    A21           3 A2 A21 3

A2   A22           3 A2 A22 3

我可以递归取到一个父部件下所有的子部件,要分层取 I can get to a recursive father of all the components under the sub-components, it is necessary to take stratification

如果通过递归来实现,结果是: If recursive to achieve a result:
A   A1 A A1
A1 A11 A1 A11
A1 A12 A1 A12
A   A2 A A2
A2 A21 A2 A21
A2 A22 A2 A22
是按树状输出的。 The tree is based on output.
而你是要按象你以上列出的输出是吗? And you are more than you should, as listed in the output is not it?
如果是这样,我觉得也不难。 If so, I think it is not difficult.

也相当于递归,只不过把原来的深度搜索改为广度搜索,请参考以下的思路: Recursion is also equivalent to only the original depth of the search changed to the extent search, please refer to the following ideas:
1)根据顶级部件(层级1)获取其所有一级子件(层级2),输出这些一级子件的同时把这些一级子件放在一个Vector中; 1) According to top-level components (level 1) access to all of its sub-items level (level 2), the output of these pieces of a child at the same time such a thing in a child in Vector;
2)循环获取Vector中的每个零件(层级2),如果没有子件,如果有子件,则输出的同时,把子件(层级3)都放在另一个Vector中; 2) access to the cycle of each of the parts Vector (level 2), in the absence of sub-items, if there is sub-items, the output at the same time, handle pieces (level 3) are placed in another Vector;
3)以此类推,继续输出层级3的子件(层级4)并把他们放在新的Vector中; 3) and so on, continue to output levels of 3-piece (level 4) and put them in the new Vector;

可以用两个Vector轮流切换使用,使用前先清空即可。 Vector two can take turns using the switch, you can use before emptying.
直到Vector中为空递归即结束。 Vector up for air that is the end of the recursion.

从根节点开始逐层递归,把每次递归的的子部件放到一个Vector中,并设置一变量,每递归一次便加1, From the beginning of root recursive layers, each of the recursive sub-components on a Vector, and set a variable, and every time they add a recursive,

可以达到效果 Could achieve the desired effect

2008 - 06 - 16 2008 - 06 - 16

Windchill 工作流的提示和技巧 Windchill workflow tips and techniques

关键字: windchill pdm plm 二次开发workflow Keyword: windchill pdm plm secondary development of workflow

Windchill 工作流的提示和技巧 Windchill workflow tips and techniques


以下提示和技巧汇集了有关工作流的一系列实用研究成果。 The following tips and techniques brings together the work flow of a series of practical research. 特别地,对经历其生命周期(由工作流自动化)而成熟的业务对象进行了重点说明。 In particular, the experience of their life cycle (from workflow automation) and a mature business targets were highlighted.

 

一般指南: General guidelines:

 

工作流适用性 Workflow applicability

 

工作流通常在业务对象实例的基础上(如文档、部件、变更请求等)与生命周期一起应用。 Workflow is usually in the business object instance on the basis of (such as documents, parts, change requests, etc.) together with the application life cycle. 在设计工作流时,请记住进程(工作流的实例)应用于修订版本。 In the design flow, please keep in mind that the process (workflow example) applies to the revised version. 这意味着: This means that:

 

  • 进程实例将为给定对象修订版本的所有小版本执行一次 Examples of the process for a given object amended version of the small version of the implementation of all time
  • 不同的修订版本将通过不同的进程实例 The revised version will be different in different examples of the process

也可以独立于业务对象来实例化工作流,但通常不会这样做。 Can be independent of the business object to examples of the work flow, but usually will not do. 通常,使用工作流的诱因是:存在着通过进程路由并且经过一系列状态而成熟的概念数据包。 Typically, the use of workflow incentive: there is through the process of routing and mature through a series of state and the concept of packets.

 

在Windchill PDMLink 中,工作流通常在对象创建时启动。 In the Windchill PDMLink, the workflow usually when they start to create the object. 在Windchill ProjectLink 中,专门通过使用路由功能为对象启动工作流,而且也以协调的方式启动以自动执行项目计划。 In the Windchill ProjectLink, routing through the use of specialized targeting to start the work flow, but also in a coordinated manner in order to start the automatic implementation of the project.

 

此外,在Windchill PDMLink 中,升级功能会启动类似于Windchill ProjectLink 路由的功能,用于多对象的状态转变管理。 In addition, the Windchill PDMLink, the upgrade will start feature similar to the Windchill ProjectLink routing functions for use in multi-object status change management.

 

工作流与生命周期 Workflow and life-cycle

 

工作流自动执行公司的作业程序,具体做法是定义一组基于用户的和系统自动化的任务,定义任务关联和路由规则,并提供自动交付的用户体验。 Workflow to automate the company's operating procedures, which would be the definition of a set of user-based systems and automated tasks, the definition of related tasks and routing rules, and provides automatic delivery of the user experience. 要看到进程状态,最简单的方法其实是使用生命周期状态。 To see the status of the process, the simplest way is to use the life cycle of state. 可直接在业务对象上看到生命周期状态,而且该状态可由工作流进程控制。 Can see objects in the business life cycle, and that the state can control the process workflow. 生命周期提供以下功能: The life cycle of the following:

 

  • 测量和显示信息成熟度等级 Measurement and display of information maturity level
  • 搜索条件 Search conditions
  • 按状态控制对数据的访问的方法 According to state control of data access methods
  • 可关联到工作流 Can be linked to workflow

可使用进程监视器以图形方式了解详细的进程测量信息。 Can be used to monitor the process of graphically detailed understanding of the process of measuring the information. 这些信息非常有用,并且非常丰富。 This information is very useful and very rich. 但是,生命周期状态通常传递的是对象在进程中处于哪个位置的经过简化的恰当信息。 However, the life cycle of state often pass the object is in the process in which the location of the simplified appropriate information.

 

生命周期管理的对象 Life-cycle management of the target

 

生命周期管理的对象与一个生命周期模板关联,并在每个状态的基础上与一个或多个工作流模板关联。 Life-cycle management of the target with a template associated with the life cycle and in every state and on the basis of one or more of the workflow associated with the template. 对于报告数据的成熟度、按成熟度控制对该数据的访问,以及为该数据提供基于状态的过滤器而言,生命周期状态很重要。 Data for the report of maturity, according to the maturity to control access to the data, as well as the provision of data on the state of filters, the life cycle of state is very important. 在不需要基于状态的行为时,建议开发继承对象模型中的高层对象的对象。 Based in the state do not need to act, the proposed development of the succession of high-level object model of the target object. 文件夹驻留对象是较简单的对象类的示例。 The presence of the target folder is a simple example of the type of object. 特别是在涉及到大量对象实例的情况下,从尽可能最简单的对象类继承能提供最佳性能。 Particularly in instances involving a large number of objects, as far as possible from the simplest object class inheritance can provide the best possible performance.

 

容器策略 Container strategy

 

在Windchill 中,工作流模板可存储在三个基本级别上— 站点、组织和容器。 In Windchill, workflow templates can be stored on three basic levels - site, and container. 建议将工作流模板存储在最高的级别上,以便能够重新使用。 Suggested that the workflow template is stored in the highest levels in order to be able to re-use. 例如,如果所有组织均可利用某个工作流模板,则应将其存储在站点级别上。 For example, if all organizations can use a workflow template, it should be stored in the site level. 工作流模板的重新使用是一个非常有用的概念,因此应对其加以考虑。 Workflow template re-use is a very useful concept, it should be taken into account. 如果工作流模板确实只在单个存储库中相关,则很可能应在该存储库中管理它。 If the workflow template really only relevant in a single repository, they are likely to be in the repository to manage it. 如果工作流模板确实不可重新使用,则将该模板存储在最低的级别上(如存储库)是一个很好的做法,因为这样做减少了可能在整个系统中造成的混乱。 If the workflow template does not re-use, the template is stored in the lowest level (such as the repository) is a good practice because it would be a reduction of the whole system may cause confusion.

工作流定义: Workflow definitions:

 

活动 Activities

  • 定义新的活动时,标识负责角色。 The new definition of the activities marking responsible for the role. 在活动逾期和/或进程出错时将通知的人员由负责角色确定 Late in the activity and / or the process will be notified of the error by the personnel in charge of determining the role of
  • 输入活动说明。 Activities that input. 系统将显示此说明以供审阅进程模板之用,它也可以显示在工作列表中。 The system will show that this review process template for use, it can also be displayed on the work of the list. 可以包含URL 以引用更详细的文档,或提供对存储表单模板的现成访问以连接到业务对象。 URL can contain references to more detailed documents, or provide for the storage form of ready-made templates to visit connected to the business object.
  • 有指示告诉您应针对任务做些什么。 There are instructions for the task should be to tell you what to do. 在这里,您应解释为何要指定某项任务、何时单击“任务完成”按钮,以及之后将会发生什么情况。 Here, you should explain why a designated task, when click "to complete the task" button, and after what will happen. 提供的信息(支持html 格式)越多越好 Information provided by the (html format support), the better
  • 确保最终用户对信息具有正确的访问权限(读取、修改等)。 To ensure that end-users with information on the correct access rights (read, modify, etc.). 通过在域级别应用这些访问策略,可以跨现有的全部业务对象轻松地在下游调整这些策略,但必须考虑到在正在执行的工作流进程上更改ACL 所带来的影响 Through the application of these domain-level access policies, across all of the existing business objects easily in the lower reaches of the adjustment of these strategies, but must take into account the ongoing work flow process to change the ACL on the impact of
  • 在某些情况下,必须提供特定的“基于活动的”访问权限,原因是访问控制特定于该实例及其活动。 In some cases, must provide a specific "activity-based" access, access control because of the specific examples of their activities. 通常,只应在最复杂的工作流情况下使用这些权限 Typically, only the most complex workflow use of these powers

工作流变量 Workflow variables

  • 建议不要在工作流变量名称中使用“空格”字符。 Is not recommended in the workflow variables used in the name of "space" character. Windchill 允许在工作流变量中使用“空格”。 Windchill allow the use of workflow variables "space." 但是,这些字符在工作流自动机java 代码中不可用 However, these characters in the workflow automation java code is not available
  • Java 基元是最常用和建议使用的工作流变量。 Java is the most common elementary and recommend the use of workflow variables. 它们优于工作流任务表单中的现成用户界面 They are superior to the work of the task flow in the form of ready-made user interface
  • Windchill 工作流的变量跟踪功能非常强大。 Windchill workflow tracking variables are very strong. 由于工作流变量在存留到数据库时是序列化的,因此,留意该类是如何序列化的非常重要。 As the work flow to the remaining variables in the database of sequence is, therefore, is how to pay attention to such series of very important. 如果序列化签名在进程的两次发放之间有变化,则会遇到进程实例包含不可解码的序列化变量的风险。 If the sequence of signatures in the process of issuing between the two changes will be encountered in the process of decoding can not contain examples of the sequence of variable risks. 因此,如果更改对象的序列化签名,则为所有以前的签名提供序列化支持很重要 Therefore, if the change of the signature sequence of the target, compared with the signatures of all the previous sequence of the provision of support is important

并行活动 Parallel activities

  • 在多个并行活动连接到一个分支中时,使用“和”或“或”连接器( 图12 In a number of parallel activities connected to a branch of the China Times, "and" or "or" connector (Figure 1 and 2)

循环链接 Cycle link

  • 应将工作流路径中第一个可使用多次的链接标识为“循环链接”( 图3 Workflow path should be the first to use a number of links for the logo "link cycle" (Figure 3)

生命周期状态映射 Life cycle state map

 

在几乎所有工作流实施中,都建议将单个父工作流与生命周期关联,以控制对象的所有可能状态。 In almost all in the implementation of the workflow, a single father suggested that the workflow associated with the life cycle in order to control the object of all possible states. 以下是此建议背后的一些原因: The following are some of the underlying reasons for this:

  • 管理工作流与生命周期的一个关联要比为每个阶段单独管理一个关联更轻松 Workflow management with the life cycle of an association than for each stage associated with a separate management easier
  • 跨所有活动共享变量 All inter-sharing activities of the variable
  • 跨不同的生命周期状态共享变量 Different from the life cycle of inter-state sharing of variables
  • 使用单个工作流时,可以在任何活动上定义循环。 The use of a single workflow, in any event the definition of the cycle. 不能在各个独立的进程中的活动之间循环 Not at all in the process of independence between the activities of the cycle
  • 进程的开销越少,性能就越佳 The process of spending less, the performance will be good
  • 正在运行的进程实例较少会使管理和监视变得更轻松 Examples of the process is running less management and monitoring would become easier

父工作流不必太大或太复杂。 Father of the work flow do not have too much or too complex. 可以将此工作流分解为多个块和子进程,这样就能获得单个父工作流下的重新使用性优点和复杂性降低的优点,就像您在与每个阶段和关口关联的工作流下所获得的这些优点一样。 Workflow can be divided into several blocks and sub-process, so we can get down the work of a single father of the re-use of the advantages and reduce the complexity of the benefits, just like you and each stage of the barrier and associated work was down by the These same advantages.

角色解析 Analysis of the role of

 

活动的角色在运行时得到解析,这样就能重新使用工作流。 Activities in the run-time role to be analytical, so that we can re-use of workflow. 角色解析只是一种指定参与某个活动的行为的机制。 Analysis of the role of designated only a certain part in activities of the mechanism.

从在该活动中指定的团队按名称或变量来解析角色,或者从对象的团队来解析角色。 From the activities of the team designated by name or to resolve the role of variables or objects from the team to resolve the role. 对象的团队使用团队模板、生命周期模板和上下文团队(对于Windchill PDMLink 和Windchill ProjectLink)进行解析。 Object-team group to use templates, life cycle templates and context team (for Windchill PDMLink and Windchill ProjectLink) for analysis.

  • 对象类型的对象初始化规则为该对象声明生命周期和团队模板 Object type of object initialization rules for the life-cycle targets of the statement and team templates
  • 在对象实例化时,会为该对象创建和初始化团队实例 In the instance of the object when the object is initialized and the create a team examples
  • 团队角色由生命周期模板和团队模板角色联合确定。 From the role of team life cycle templates and a joint team to determine the role of the template. 注意这并不包括容器角色 This does not include attention to the role of the container
  • 角色成员资格由容器团队和团队模板联合确定 The role of team membership by the container and determine the joint team templates
  • 如果角色在团队模板中不存在,则角色成员资格由容器团队和生命周期模板联合确定 If the role of the team in the template does not exist, the role of team membership by the container and determine the joint life cycle templates
  • 请注意,如果在创建对象后修改了容器团队或团队模板,并希望这些修改在进程中始终保持最新状态,则必须扩大(刷新)对象的团队 Please note that if the target were altered to create containers team or team template, and that these changes in the process of always up to date, you must expand the (set) the object of the team

工作流 Java代码 Workflow Java code

请注意,活动的Java 代码被限制为2000 个字符,因此将需要创建类才能进行更复杂的处理。 Please note that the activities of the Java code was limited to 2,000 characters, it will need to create a category in order to carry out more complex to deal with.

静态代码 Static code

  • 使用静态代码调用帮助程序(本身又调用服务器的方法) The use of static code to help process calls (calls itself the server method)
  • 应尽可能减少工作流中的Java 代码,使清晰的工作流编码主要包含对帮助程序类的调用。 As far as possible to reduce the flow of work in the Java code, so that a clear code of the main workflow procedures to help contain the type of call. 这允许重新使用工作流帮助程序功能,而且还通过模块化提高了测试效率 This allows re-use workflow features to help process, but also through the modular test increased efficiency

异常处理 Exception Handling

须正确处理异常,因为不正确的异常处理会: Have to correctly handle the anomalies, because they do not correct the anomalies will be dealt with:

  • 隐藏异常并且不采取任何操作 Hidden and do not take any abnormal operation
  • 造成工作流未完成 Workflow unfinished cause
  • 引起不想要的行为 Cause unwanted behavior

好的做法是: Good practice:

  • 返回“结果”属性,以便明确地路由工作流进程 Return to the "results" property in order to clear the workflow routing process
  • 返回“错误消息”属性,以便工作流的下一步获得要提供的一些信息 Return to the "wrong message" attributes, so that the next step in the workflow to provide access to some of the information

测试 Test

  • 如果工作流包含多段Java 代码,则先使用小型的独立Windchill 客户端应用程序测试此代码(与工作流分隔开)。 If the workflow includes multi-source Java, the first use of small independent Windchill client application to test the code (and flow of work separated). 还要经常执行“验证代码”以确保代码起作用。 But also the regular implementation of the "verification code" to ensure that the code works.

同步 Synchronization

工作流测试 Workflow test

  • 小版本:在测试工作流之前在工作流上执行检入。 Small version: In the test flow in the workflow, before the implementation of the check-in. 如果忘记检入工作流模板,则在终止已启动的工作流实例之前,将无法再修改工作流模板 If you forget the check-in workflow templates, you have to terminate at the start of the workflow instances before will no longer be able to amend the workflow template
  • 流逻辑:审阅者应检查流逻辑是否合理,以确保没有未终止的路径 Flow Logic: reviewer should check the flow of logic is reasonable, not an end in order to ensure that there is no path
  • 所有循环路径均应包含图4中以红色表示的循环链接 All the cycle path should be included in Figure 4 in the red circle link
  • 如果每个循环只能激发一条路径,则多条路径可以会合到任务上。 If each cycle can only stimulate a path, the path may be a number of tasks to join. 图7中,三条路径会合在一起,但一次只能激发一条路径 In Figure 7, the path of the three to join together, but can only stimulate a path
  • 最新的工作流实例:生命周期应始终指向最新的工作流小版本 The latest example of the workflow: the life cycle should always point to the latest version of the work of a small stream
  • 验证工作流:在工作流编辑器中,执行“全部验证”命令 Workflow verification: in the workflow editor, the implementation of the "full verification" command
  • 语法检查:在工作流编辑器中,为所有表达式自动机、任务计数、Java 代码等执行“检查语法” Grammar check: Workflow Editor for the expression of all automatic machines, the task count, Java code, such as the implementation of the "grammar check"
  • 数据:如果工作流修改它所应用于的数据,或甚至修改状态,则使用csv 载入文件来创建测试数据可能很有帮助。 Data: If it applies to amend the workflow of data, or even to amend the state, using a csv file to create a load test may be helpful. 这允许快速删除和重新载入数据,以供其他测试之用 This allows rapid reload and delete data for other testing
  • 承担者设置:如果使用表达式代码来设置生命周期或类似的功能,请确保作为对象创建者而不是默认管理员来这样做。 Holders: If you use the expression code to set up life-cycle or similar features, please ensure that the object as a creator rather than the default administrator to do so. 图8包含以下代码: Figure 8 contains the following code:

    wt.org.WTPrincipal creator=(wt.org.WTPrincipal)wtcr.getCreator().getObject(); wt.session.SessionHelper.manager. setPrincipal ( creator.getName() ); wt.org.WTPrincipal creator = (wt.org.WTPrincipal) wtcr.getCreator (). getObject (); wt.session.SessionHelper.manager. setPrincipal (creator.getName ());

    wt.lifecycle.LifeCycleHelper.service.reassign(wtcr,wt.lifecycle.LifeCycleHelper.service.getLifeCycleTemplateReference(“My Lifecycle Template”)); wt.lifecycle.LifeCycleHelper.service.reassign (wtcr, wt.lifecycle.LifeCycleHelper.service.getLifeCycleTemplateReference ( "My Lifecycle Template"));

  • 设置状态检查:对于版本/小版本受控的某个对象(如WTDocument)而言,应有代码负责检查是否在每个设置状态自动机之前共享和/或检入了此对象( 图910 Set up a state inspection: The version / version control of a small object (such as WTDocument), the code should be in charge of checking whether each set before the state machine to share and / or check the object (Figure 9 and 10)
  • 代理:如果使用了工作流代理,并且正在使用载入文件,请确保先导入代理 Agent: If you use a proxy workflow, and is included in the use of paper, be sure to import agent
  • 转: http://www.pisx.com/bbs/topic.php?filename=7347&extra=page%3D57 To: http://www.pisx.com/bbs/topic.php?filename=7347&extra=page% 3D57

    2008 - 06 - 16 2008 - 06 - 16

    生命周期客制化问题 The life cycle of customization problem

    关键字: windchill pdm plm 二次开发lifecycle Keyword: windchill pdm plm second development lifecycle

    再次使用enumCustomize进入检查你新添加的状态是否存在,如果不存在,说明没有添加成功。 Once again check into the use of enumCustomize you add a new state of existence, if not exist, that does not add success.
    使用enumCustomize同时需要对zh_CN(中文)的生命周期状态进行添加。 At the same time, the use of enumCustomize need zh_CN (Chinese) the life cycle of state added.

    除了重新生成jar文件外,Windchill服务需要重新启动 In addition to the jar to re-generate documents, Windchill services need to restart

    ************************************

    enumCustomize经常会不成功。 enumCustomize often unsuccessful.

    也可以使用手工方式。 You can also use manual mode.

    把src/wt/lifecycle目录下的StateRB_zh_CN.rbInfo和StateRB.rbInfo文件复制到src/ext/xxx/lifecycle目录下(其中xxx表示客户名称缩写)。 The src / wt / lifecycle directory StateRB.rbInfo's StateRB_zh_CN.rbInfo and copy the files to src / ext / xxx / lifecycle directory (where xxx said that the name of the customer initials).

    然后在StateRB_zh_CN.rbInfo和StateRB.rbInfo文件中添加新的生命周期状态定义。 StateRB_zh_CN.rbInfo and then StateRB.rbInfo document to add a new definition of the life cycle of state.

    然后在命令行进行编译: And then compile the command line:

    Windchill wt.util.AppStarter wt.tools.ResourceGenerator wt/lifecycle wt.resource.source.dir=%WT_HOME%\src\ext\xxx Windchill wt.util.AppStarter wt.tools.ResourceGenerator wt / lifecycle wt.resource.source.dir =% WT_HOME% \ src \ ext \ xxx

    2008 - 06 - 16 2008 - 06 - 16

    通过对象ID获取指定的软属性 ID access to the designated target through the soft property

    关键字: windchill pdm plm 二次开发iba Keyword: windchill pdm plm second development iba

    根据对象ID可获得对象。 According to the ID will be the target object.

    根据对象即可获得其任一软属性的值。 According to object to any of its soft value of the property. 请参考: Please refer to:

    Hashtable ibaContainer; Hashtable ibaContainer;

    private void initializeIBAPart(IBAHolder ibaholder) private void initializeIBAPart (IBAHolder ibaholder)
    { (
    ibaContainer = new Hashtable(); ibaContainer = new Hashtable ();
    try
    { (
    ibaholder = IBAValueHelper.service.refreshAttributeContainer(ibaholder, null, SessionHelper.manager.getLocale(), null); ibaholder = IBAValueHelper.service.refreshAttributeContainer (ibaholder, null, SessionHelper.manager.getLocale (), null);
    DefaultAttributeContainer defaultattributecontainer = (DefaultAttributeContainer)ibaholder.getAttributeContainer(); DefaultAttributeContainer defaultattributecontainer = (DefaultAttributeContainer) ibaholder.getAttributeContainer ();
    if(defaultattributecontainer != null) if (defaultattributecontainer! = null)
    { (
    AttributeDefDefaultView aattributedefdefaultview[] = defaultattributecontainer.getAttributeDefinitions(); AttributeDefDefaultView aattributedefdefaultview [] = defaultattributecontainer.getAttributeDefinitions ();
    for(int i = 0; i < aattributedefdefaultview.length; i++) for (int i = 0; i <aattributedefdefaultview.length; i + +)
    { (
    AbstractValueView aabstractvalueview[] = defaultattributecontainer.getAttributeValues(aattributedefdefaultview ); AbstractValueView aabstractvalueview [] = defaultattributecontainer.getAttributeValues (aattributedefdefaultview);
    if(aabstractvalueview != null) if (aabstractvalueview! = null)
    { (
    Object aobj[] = new Object[2]; Object aobj [] = new Object [2];
    aobj[0] = aattributedefdefaultview ; aobj [0] = aattributedefdefaultview;
    aobj[1] = aabstractvalueview[0]; aobj [1] = aabstractvalueview [0];
    ibaContainer.put(aattributedefdefaultview .getName(), ((Object) (aobj))); ibaContainer.put (aattributedefdefaultview. getName (), ((Object) (aobj)));
    } )
    } )

    } )
    } )
    catch(Exception exception) catch (Exception exception)
    { (
    exception.printStackTrace(); exception.printStackTrace ();
    } )
    } )

    根据以上函数,已经把对象的所有软属性及其值获取到Hashtable ibaContainer中,你就可以直接根据软属性名称获取其值。 Based on the above function has been to targets of all the soft property values and access to the Hashtable ibaContainer, you will be able to directly access the name of the soft property value.

    2008 - 06 - 16 2008 - 06 - 16

    只导出产品结构 Only export product mix

    关键字: windchill pdm plm 二次开发bom Keyword: windchill pdm plm second development bom

    不包括文档,只要部件和结构。 Does not include documents, as long as the components and structures.
    默认的导出好像把部件关联的文档也导出了。 It seems that the default export components associated documents are derived.

    应该可以,但是要做点点开发,写一个你自己的Exporter...我写过个DocumentExporter, 原理是差不多。 Should be able to, but do little to develop and write your own a Exporter ... I wrote a DocumentExporter, more or less the same principle. 主要是要了解export 的csv 文件的结构,还有他是如何工作的。 The main export is to understand the structure of the csv file, and how he is working. 还有个办法就是不管系统本身的导出方法,你自己刻一写个程序,按你喜欢的格式导出你喜欢的东西。 There is a way to export the system itself regardless of method, you have a moment to write a program, according to the format you like you like to export. 附件是一个独立的导出WTDocument的小程序。 Annex is an independent export of WTDocument applet. 注意,该程序是在Windchill5.1的环境下写的 Note that the program was written under Windchill5.1 environment of the

    2008 - 06 - 16 2008 - 06 - 16

    EPMDocument文档信息的获取 EPMDocument documents to obtain information

    关键字: windchill pdm plm 二次开发epm Keyword: windchill pdm plm second development epm

    You call the nextElement() three times. When the first time you call the nextElement() method in the line of "System.out.println", it gets the first element. When you call the second  time in the line "epmDoc = ", it will get the second element in the query result. Assuming you only have one describing document, you never get the one to pass to the epmDoc object. You call the nextElement () three times. When the first time you call the nextElement () method in the line of "System.out.println", it gets the first element. When you call the second time in the line "epmDoc = ", It will get the second element in the query result. Assuming you only have one describing document, you never get the one to pass to the epmDoc object.

    建议如下修改: Proposed the following amendments:
    QueryResult epmQr = wt.part.WTPartHelper.service.getDescribedByDocuments(obj); QueryResult epmQr = wt.part.WTPartHelper.service.getDescribedByDocuments (obj);
    wt.epm.EPMDocument epmDoc = null; wt.epm.EPMDocument epmDoc = null;
    while (epmQr.hasMoreElements()) { while (epmQr.hasMoreElements ()) (
    try { try (
    Object temp = empQr.nextElement(); Object temp = empQr.nextElement ();
    System.out.println("文档类型:"+temp.getClass()) ; System.out.println ( "document type:" + temp.getClass ());
    if(temp instanceof wt.epm.EPMDocument) if (temp instanceof wt.epm.EPMDocument)
    { (
    wt.epm.EPMDocument epmDoc = (wt.epm.EPMDocument) temp; wt.epm.EPMDocument epmDoc = (wt.epm.EPMDocument) temp;
    System.out.println("==EPM=" + epmDoc.getName()); System.out.println ( "== EPM =" + epmDoc.getName ());
    } )
    } catch (Exception ex1) { ) Catch (Exception ex1) (
    ex1.printStackTrace(); ex1.printStackTrace ();
    } )
    } )

    2008 - 06 - 16 2008 - 06 - 16

    获取工作流中的核准者这一角色 Access to the workflow of those who approve of this role

    关键字: windchill pdm plm 二次开发workflow Keyword: windchill pdm plm secondary development of workflow

    获取产品工作流中的进程角色— 核准者 ,假如一个工作流中核准者的参与者是“A”,用什么语句才能获取“A”? Access to product workflow role in the process - approval, if the work of a stream of participants who are approved by the "A", what statement in order to obtain the "A"? ?

    Enumeration roles = process.getRoles(); Enumeration roles = process.getRoles ();
    while (roles.hasMoreElements()) while (roles.hasMoreElements ())
    { (
    wt.project.Role role = (wt.project.Role)roles.nextElement(); wt.project.Role role = (wt.project.Role) roles.nextElement ();
    if (role.getDisplay().equalsIgnoreCase("approver")) if (role.getDisplay (). equalsIgnoreCase ( "approver"))
    { (
    Enumeration assignees = process.getPrincipals(role); Enumeration assignees = process.getPrincipals (role);
    if (assignees.hasMoreElements()) if (assignees.hasMoreElements ())
    { (
    approver=(WTPrinciplal)assignees.nextElement(); approver = (WTPrinciplal) assignees.nextElement ();
    } )
    } )
    } )

    2008 - 06 - 15 2008 - 06 - 15

    BOM结构的更改标记不显示问题 BOM markers do not change the structure of the problem

    关键字: windchill pdm plm 二次开发bom Keyword: windchill pdm plm second development bom

    在PDM与K3的集成中,当整个BOM结构发布到K3上,BOM结构中的“更改标记”那一项的值为空,而原先BOM结构更改标记是有显示的,如:删除的料号标记为“D”;新增的料号标记为“A”;变更的料号标记为“C”等。 In the PDM with integrated K3, when the entire structure of the BOM to release K3 on, BOM structure of the "marked change" that the value of an empty, and change the structure of the original BOM markers are shown, such as: to delete the material, Marked "D"; new material, labeled "A"; the change is expected, marked "C" and so on. 查了PublishErp.java文件以前的版本和现在的版本,找不出原因。 Richard PublishErp.java the previous version of the document and present version, can not find the reason. (下面是PublishErp1.1版本(早期版本)和PublishErp.java2.2版本(现在使用的版本)) (The following is a version of PublishErp1.1 (early version) and PublishErp.java2.2 version (now using version))

    是所有的BOM结构发布都存在这个问题。 All of the BOM structure is released there on this issue. 以前BOM结构发布更改标记会有显示,而现在更改标记都显示不出来。 BOM prior to release to change the structure of the show will be marked, and now to change the tags do not show up. 怀疑是PublishErp文件升版后的原因,检查该文件又找不出原因来。 PublishErp suspected version of the document or the reason, check the file and can not find reasons to come. (下面是BOM结构的excel文件。) (The following is a BOM structure of the excel file.)

    • 18c61cb7-b884-33ef-81fd-04311c3f04f4-thumb
    • 大小: 58.2 KB Size: 58.2 KB
    2008 - 06 - 15 2008 - 06 - 15

    Windchill 8 安装过程简述 Windchill 8 on the installation process

    关键字: windchill pdm plm 二次开发load Keyword: windchill pdm plm development of the secondary load

    以下无特殊说明,都是选择典型 No special note of the following are typical

    1-在 1 - in www.java.com下载JDK www.java.com download JDK

    2-安装JDK1.4.2 注:1.4.2_06以后版本,不可使用1.5 2 - to install JDK1.4.2 Note: 1.4.2_06 or later, can not use 1.5

    3-准备DNS或$Windows/system32/driver/etc/hosts文件,做一个本机域名。 3 - ready to DNS or $ Windows/system32/driver/etc/hosts documents, a local domain name. 例如: For example:
    127.0.0.1   eric   eric.ptc.com 127.0.0.1 eric eric.ptc.com

    4-安装Tomcat(Windchill 8.0 Third Party Application光盘中,通常有一绿色标签START HERE)。 4 - to install Tomcat (Windchill 8.0 Third Party Application CD-ROM, usually with a green label START HERE). PTC提供的Tomcat是做过剪裁的,在浏览器里输入localhost:端口号也看不到小猫 PTC provided by the Tomcat is the tailoring done in the browser, enter localhost: port number, instead of seeing the kitten

    5-安装Apache。 5 - to install Apache. 在浏览器里输入localhost,可以看到Apache的羽毛:) In the browser, enter localhost, we can see the Apache feather:)

    6-安装Aphelion,安装完成后用LDAPBrowser确认一下LDAP Service确实已经Running了 6 - the installation of Aphelion, the installation is complete with LDAPBrowser confirm LDAP Service does have the Running

    7-安装Info*Engine。 7 - to install Info * Engine. 安装完成后,在浏览器里输入 After the installation is complete, in the browser, enter http:// $yourhost.$yourcompany.com/$yourWindchillApplicationName/infoengine/jsp/examples/VerifyIE.jsp ,页面能正常显示,就OK。 http:// $ yourhost. $ yourcompany.com / $ yourWindchillApplicationName / infoengine / jsp / examples / VerifyIE.jsp, the page can display on OK. 嫌URL里Windchill字样太长的可以在安装的时候改个短的。 URL too long in the words of Windchill can be installed in a short period of time to change.

    上述这些步骤一般都不会有问题( 上述软件的安装可以参考<<Info*Engine安装指南>> ),从下面的步骤开始要仔细参阅WCInstallConfigGuide_WCInstall.pdf中的要求来安装。 These steps will not matter in general (the above-mentioned software can be installed on the reference <<Info*Engine安装指南>>), from the beginning of the following steps should be carefully read in WCInstallConfigGuide_WCInstall.pdf the request to install.

    8-安装Oracle,选择定制,查一下WCInstallConfigGuide_WCInstall.pdf,详细的描述了要选那些组件。 8 - to install Oracle, custom option, check WCInstallConfigGuide_WCInstall.pdf, a detailed description of the election to those components. 特别要说明的是不要创建数据库 ,但是要配置Listener。 In particular note is not to create the database, but to configure the Listener. WCInstallConfigGuide_WCInstall.pdf里描述了各种可能的数据库安装方式,不要一一全部操作,看清楚了每个操作的前提,符合自己要求的才去做。 WCInstallConfigGuide_WCInstall.pdf described in every possible way to install the database, not the full operation on January 1, look operated on the premise of each, in line with the requirements of their own to do before.

    9-安装OCU(Windchill 8.0 Third Party Application光盘中,通常有一绿色标签START HERE),创建数据库,记得一定要改SID。 9 - to install OCU (Windchill 8.0 Third Party Application CD-ROM, usually with a green label START HERE), to create the database, remember to change SID. 一般用wind With the general wind

    10-依次安装Windchill Service、PDMLink(如果你需要)、Project Link(如果你需要)、Multi Language Pack、Service Pack。 10 - followed by the installation of Windchill Service, PDMLink (If you need to), Project Link (If you need to), Multi Language Pack, Service Pack. 所有都选定制, 加入[显示剪裁的文本](如果有此选项,否则无法定值Windchill里的Role、Status等下拉菜单)。 All are custom-election, to join [the text shows that tailoring] (If this option is not possible to set the value of Windchill's Role, Status, such as pull-down menu). 这时候会要求指定Windchill的管理员账户和密码(用于初始化的时候Java认证和以后以管理员身份登录Windchill)以及JDBC的账户和密码,这里可以根据你的要求来指定,但后面第二次安装OCU的时候要与之一致。 This would require the designation of Windchill administrator account and password (used to initialize a time when Java certification and after Log Windchill), as well as the JDBC account and password, you can be here to specify the requirements, but after the first OCU second time to install them in line. 改掉“厕所管理员”可以在这时候操作。 To remove the "toilet administrators" can operate at this time.

    11-比较高深的东东——xconfmanager出场了,用xconfmanager来修改wt.db.maxBytesPerChar 11 - high compared with the East - xconfmanager out, xconfmanager used to modify the wt.db.maxBytesPerChar

    12-用JavaGen.bat生成初始化的DDL Script,当然也包括Service Pack的wnc-wsp。 12 - used to initialize JavaGen.bat generation of DDL Script, of course, including the Service Pack of wnc-wsp.

    13-再次安装OCU,选择创建用户(这里要和第10步的JDBC帐户和密码一致)和执行脚本(create_ddl_wt),然后用JDBC帐户和密码手工进入SQLPlus执行wnc-wsp。 注:不要张冠李戴地用Oracle System帐户执行这两个脚本

    14-xconfmanager再次出场,修改wt.db.encoding,wt.locale.encoding和wt.template.charset以及其他书里提到、你想修改的东东。

    15-修改wt\load\foundationLoad.xml、com\ptc\windchill\pdmlink\load\pdmlinkLoad.xml以及com\ptc\windchill\projectlink\load\projectlinkLoad.xml

    16-一切都OK以后,开始导初始化数据,wt.load.WindchillLoader -All -UAOps。虽然是无人值守模式,但还要输入一次管理员密码,也就是在第10步时指定的账户和密码( 不是JDBC帐户和密码,更不是Oracle的System帐户和密码 )。这时候只用起Apache和Tomcat就行了,按照书上说还要起Server Manager和Method Server,实践证明起了也白起。

    17-当Windchill外壳程序报告Load Complete的时候就大功告成了。打开浏览器,输入 http:// $yourhost.$yourcom.com/$yourWindchillApplication, 就应该会看到PTC的Logo了。验证通过以后,首当其冲要在站点-实用程序-承担者管理器里把管理员加到当前组织中(否则管理员无法创建产品、项目、存储库),并且给管理员填好电子邮件地址(否则管理员无法添加到各个团队中)。

    2008 - 06 - 15

    wt.load.LoadFromFile导入权限规则

    关键字: windchill pdm plm 二次开发load

    <?xml version="1.0" encoding="GBK"?><!DOCTYPE NmLoader SYSTEM "standardX05.dtd">
    <NmLoader>
    <csvAccessRule handler="wt.load.LoadUser.createAccessRule" >
    <csvuser></csvuser>
    <csvdomain>/Default</csvdomain>
    <csvtypeId> WCTYPE|wt.doc.WTDocument|com.abc.Plan </csvtypeId>
    <csvpermission>+</csvpermission>
    <csvprincipal>Manager</csvprincipal>
    <csvpermissionList>-1</csvpermissionList>
    <csvstate></csvstate>
    </csvAccessRule>

    </NmLoader>

    为一个子文档类型作权限初始化。

    <csvpermission>中的保留字就是“+”和“-”,即授予和拒绝的权限

    <csvpermissionList>的保留字说明如下:

    关于访问控制规则导入文件中权限的设置

    访问控制规则导入文件中各种权限的代码如下:

    All   -1
    READ   0
    MODIFY   1
    CREATE   2
    DELETE   5
    ADMINISTRATIVE  6
    REVISE   7
    NEW_VIEW_VERSION 8

    如果需要同时授予多个权限,则使用“/”隔开。
    如:授予读取和修改权限,则设置为:“0/1”。

    2008 - 06 - 15

    关于.conf和.properties的问题

    关键字: windchill pdm plm 二次开发

    参考site.xconf文件中本来的内容进行定义。

    如:<Property name="wt.webserver.port" overridable="true" targetFile="codebase/wt.properties" value="80"/>

    意思是在codebase/wt.properties文件中wt.webserver.port的值为80.

    进入wt.properties文件中可以看到以下内容:

    wt.webserver.port=80


    你可以在site.xconf文件中按以上格式添加或更改,然后在Windchill Shell下执行xconfmanager -p即可使之生效到对应的.properties文件中。

    2008 - 06 - 15

    QuerySpec里面的appendGroupBy方法的使用

    关键字: windchill pdm plm 二次开发系统queryspec
    QuerySpec里面的appendGroupBy方法的使用
    appendGroupBy ( ColumnExpression a_column, int[] a_fromIndicies, boolean a_appendSelect)
    Appends the column expression to the GROUP BY clause.
    Parameters:
    a_column - object to append
    a_fromIndicies - array of ordinal index values into the QuerySpec's FromClause that reference TableExpressions used by the ColumnExpression
    a_appendSelect - Indicates if the ColumnExpression should be appended to the SELECT clause also.
    2008 - 06 - 15

    关于版本的操作

    关键字: windchill pdm plm 二次开发系统version

    关于版本的操作

    获取所有大版本的最新小版本:
    VersionControlHelper.service.allVersionsOf()

    获取所有小版本:
    ConfigHelper.service.filteredIterationsOf()

    根据WTPartMaster获取其对应的所有WTPart的方法

    LatestConfigSpec latestconfigspec = new LatestConfigSpec();
    QueryResult queryresult = ConfigHelper.service.filteredIterationsOf(partMaster, latestconfigspec);

    **************************************

    如何实现这样的版本序列000.1 、001.1

    请教高手,客户要求系统中的对象版本号为000.1 000.2    ......等。

    即大版本必须从000开始到999,保持三位,前面的0不能省略。

    小版本不要求位数。

    使用基于文件的版本化方式,XML文件如:
    <?xml version="1.0" encoding="UTF-8"?>
    <scheme>
    <series name = "name1">
    <value>001</value>
    <value>002</value>
    <value>003</value>
    ....
    </series>
    </scheme>

    2008 - 06 - 15

    流程中三个活动并行(并非多人审核)

    关键字: windchill pdm plm 二次开发系统workflow
    驳回的那条走同时走三条线

    另外两个为或即可,然后根据阀值就会判断是否为驳回,这样无需做任何开发,只是图上符号比较多而已
    2008 - 06 - 15

    客制化实用知识

    关键字: windchill pdm plm 二次开发系统
    URL url =GatewayURL.getAuthenticatedGateway(null).getURL("");
    *********************************************
    假定由Workflow的特定任务发布,你可以通过找到相应的process

    QueryResult runningProcesses = WfEngineHelper.service.getAssociatedProcesses(part, WfState.OPEN_RUNNING, null);

    也可以直接找相应的WTPart的task: WorkflowHelper.service.getWorkItems(part);
    **********************************************
    原来也可以从生命周期历史中直接取得:
    LifeCycleHelper.service.getHistory(myObject)
    取得历史再用:
    lifecyclehistory.getState().toString()
    lifecyclehistory.getModifyTimestamp()
    取得相应的状态所对应的最新更新时间。
    **********************************************

    流程审批意见

    Vector reviewVector=LifeCycleHelper.service.getAllReviewerList(theck);
    **********************************************
    只需在site.xconf中的添加如下定义:

    <Property name="wt.taglib.util.plugin.attr.iepluginurl" overridable="true" targetFile="codebase/wt.properties" value=" http://xxx.xxx.com/Windchill/wt/clients/library/j2re-1_4_2-windows-i586.exe"/ >

    并执行xconfmanager -p使之生效。

    然后把j2re-1_4_2-windows-i586.exe文件复制到Windchill服务器的以下目录:

    ../ptc/Windchill/codebase/wt/library

    当客户进入带有Applet的页面时,将自动从服务器下载JRE并提示用户进行安装
    ********************************************
    在我们的产品信息管理器中有一个“行号”,详细页面的“产品结构”中也有显示该"行号".查看一下“行号”并不part的IBA属性。不知到该用什么方法取得呢?
    谢谢!
    获得link后,就可以获得行号。
    如:
    LineNumber lineNumber = (LineNumber)link.getLineNumber();
    long value = lineNumber.getValue();
    **********************************************
    LDAP的密码是明文的。
    在配置文件...\Aphelion\usr\var\lde\PTCLdap\PTCLdap_lde.conf中可以查到。
    ***********************************************
    用TypeIdentifierUtility.getTypeIdentifier(doc)
    typeidentifier.toString().indexOf(".****StandardDoc")
    判断是不是“标准文档”。
    **********************************************
    现在想要实现从系统中用Excell导出part及其一些属性,采用
    WritableWorkbook bookAuto = FileManager.createExcelFile("d:\\part\\part0.xls","Part");
    2008 - 06 - 15

    如何取一个成品的所有成品配置,并取得成品配置的结构

    关键字: windchill pdm plm 二次开发系统struct

    如何取一个成品的所有成品配置,并取得成品配置的结构

    public static Vector getProductConfigurationByWTPart(WTPart part)
    throws WTException
    {
    Vector vector = new Vector() ;
    QueryResult qr ;
    qr = ConfigurationHelper.service.getConfigurationsNormal((ConfigurationManageable)part) ;
    while(qr.hasMoreElements())
    {
    WTProductConfiguration conf = (WTProductConfiguration)qr.nextElement() ;
    vector.add(conf) ;
    }
    return vector ;
    }

    2008 - 06 - 15

    用程序生成制造视图的部件

    关键字: windchill pdm plm 二次开发系统view

    WTPart newpart = (WTPart)ViewHelper.service.newBranchForView((wt.vc.views.ViewManageable)wtpart, "Manufacturing");

    newpart = (WTPart)PersistenceHelper.manager.save(newpart);

    WTPart newpart = (WTPart)ViewHelper.service.newBranchForView((wt.vc.views.ViewManageable)wtpart, MANUFACTURING_VIEW_NAME);

    String location =FolderHelper.service.getLocation((CabinetBased)wtpart );

    Debug.out(CLASSNAME + "--> CreateNewView--> location="+location);
    String parentLocation = location.substring( 0, location.lastIndexOf("/"));
    System.out.println(CLASSNAME + "-->CreateNewView --> parentLocation :"  + parentLocation);

    String newViewLocation= parentLocation + "/" + "Menufacturing" ;
    System.out.println(CLASSNAME + "--> -->  newViewLocation:"  + newViewLocation);

    Folder folder=FolderHelper.service.getFolder(wtpart.getLocation(),wtpart.getContainerReference());
    newpart.setFolderingInfo(FolderingInfo.newFolderingInfo(folder));

    2008 - 06 - 15

    如何把模型内的参数与intralink8.0里的属性映射起来

    关键字: windchill pdm plm 二次开发

    我的模型属性,比如cname,mat等,如何与intralink8.0下建的对应属性映射起来,

    我的类型管理器下,那个属性栏下的添加属性都是灰色

    见图:
    0

    注意在属性根那边可以先建立个对象属性,然后把code,name等作为其子属性.
    配置好iba.pro文件后,在初始化对象属性的时候,你更新后就可以添加属性,然后把上面的属性全选添加就OK了.
    注意大小写的区别,建议proe下和windchill下都大写.

    2008 - 06 - 15

    许昌烟机公司成功集成PTC的WINDCHILL和CAPP/ERP系统

    关键字: windchill pdm plm 二次开发

    许昌烟机公司成功集成PTC的WINDCHILL和CAPP/ERP系统

    更敏捷地实施PLM及CAPP/ERP系统集成,助力烟机研制迈上新台阶

    中国北京 - 2007年8月7日,PTC今天宣布,中国技术实力领先的烟草机械制造商许昌烟草机械有限责任公司(以下简称许昌烟机公司)成功地将PTC的Windchill解决方案与CAPP/ERP系统进行了全面集成。许昌烟机公司采用PTC的Windchill 8.0解决方案实现了电子图档管理、电子化的签审流程、变更修改流程及PDM-CAPP-ERP的系统集成等功能,来完成该企业数据体系集成项目。

    许昌烟机公司是中国领先的烟草机械制造商,也是世界上为数不多的能制造高速机组的烟机制造商,产品畅销全球十多个国家。许昌烟机公司采用了PTC的Pro/E和Windchill8.0,以建立先进及高水平的产品研发和管理体系,能更有效地研发产品及处理产品相关的数据和信息以增强部门之间的沟通。烟机产品开发是一个非常复杂的过程,其中涉及在继承的基础上创新,研发中心与生产厂的异地数据传输,而其中PDM与其它应用系统的全面集成,是提高企业信息化运行质量的前提。许昌烟机公司这次成功的全面集成PDM系统可以确保整个产品生命周期内数据的统一、准确和方便追踪。该项目的成功实施帮助许昌烟机公司建立了行业的统一研发平台,解决了现在产品技术管理中存在的各种问题,达到了PDM系统的电子图档管理- 电子化的流程签审- 符合CMII规范的修改变更,提升了企业竞争优势,健全了企业内部的产品技术管理体系。

    以往,许昌烟机经常在产品技术管理过程中发现不同IT系统涉及到的数据集成问题,越来越明显的零部件选用和浪费问题,以及面临着项目管理的复杂程度越来越高的问题。 Windchill8.0可将设计和生产的数据实现无缝对接,不仅可优化产品的开发过程,更可大大减低发生错误的风险及降低整体管理成本。此次使用的Windchill8.0将与许昌烟机现有的CAPP/ERP系统及产品开发的数据体系全面集成起来,通过双向整合,Windchill8.0把PDM 和CAPP/ERP系统强有力地衔接起来,从而加快产品研发速度、提高工作质量、提升产品品质。

    “在与PTC合作之前,我们的CAPP/ERP系统与产品开发流程是独立运作的。此次系统的全面集成,帮助我们显著改进了产品开发过程,集成的信息系统拥有更加准确、快捷的优点,我们现在能够在同等数量的时间内生产更多的产品。”许昌烟机公司的信息中心主任冯喜民表示:“PTC的产品生命周期管理解决方案在功能上有较高的弹性,能满足我们在产品开发及与CAPP/ERP集成方面的需要。我们非常高兴能与PTC 合作。”

    “长期以来,将PLM与CAPP/ERP系统集成一直是行内的一大挑战,因为它涉及漫长而复杂的实施过程以及不同IT系统的集成问题。这次PDM系统成功的全面集成,让许昌烟机公司的产品开发与制造过程能够无缝地协作。” PTC亚太区分销业务副总裁Dan Maier说。

    许昌烟机公司有限公司简介

    许昌烟草机械有限责任公司(以下简称许昌烟机公司)是由中国烟草机械集团有限责任公司控股的开发和制造烟草机械的大型骨干企业,从事烟草机械生产经营已有47年的历史,公司主要产品畅销全国大中型卷烟企业和全球十多个国家,是世界上为数不多的能制造高速机组的企业之一。 CAD/CAPP/CAM等先进的技术手段已被广泛应用于产品设计与制造,ERP系统已覆盖公司的管理领域。许昌烟机公司现有员工1065人,其中专业技术人员500多人。

    有关许昌烟机公司的详细信息,敬请访问 http://www.xcyj.com

    关于PTC的中小企业( SMB )解决方案

    PTC的中小型企业(SMB)解决方案为生产型公司提供价位适中、使用简单并且可扩展的3D CAD/CAM/CAE解决方案。此外,PTC还为满足中端市场特殊的产品数据管理和协作要求,提供专门的生命周期管理(PLM)解决方案。目前,PTC通过320多家增值销售商(VARs)为41个国家的35,000家中小型企业客户提供服务。

    2008 - 06 - 15

    Windchill 9.0 — 生产率的新水平

    关键字: windchill pdm plm 二次开发

    Windchill 9.0 即将发布。除了许多新的设计工程功能之外,制造工程师现在能够利用Windchill 来开发制造过程。 Windchill 9.0 还提供新的强大的用户界面配置功能、显著改善的可视化性能,以及全新的Windchill 业务报告功能。

    利用Windchill 9.0实现卓越制造。及早访问可靠的产品设计数据对许多制造工程师而言是重要的需求。产品设计时间表不断缩短,而供应链和产品开发团队变得更为复杂。制造工程师对进行中的设计了解得越多,按时及按预算生产出新产品的可能性就越大,速度也越快。

     

    为了加快制造过程管理(MPM) 的速度,Windchill 9.0 引入了一个新的可选模块(称为Windchill MPMLink),它为制造工程师提供了一个在构建模型时就能了解所有工程设计的直接、完整的窗口,以及面向制造的新的开发工具。在设计工程师创建产品时,制造工程师可以使用相同的设计来创建制造过程计划、构建制造物料清单(mBOM),以及整理图形式工作说明以指导车间装配产品。

    作为Windchill 的一个组成部分,Windchill MPMLink 在工程和制造物料清单(eBOM 和mBOM)之间形成关联的链接。这样一来,无论工程师何时更改eBOM,所做的更改均会自动在mBOM 中反映出来。通过获得详细产品模型的访问权,制造工程师能准确、深入地了解将需要哪些夹具、模具和其他辅助生产工具或服务。

    PTC 的Windchill 产品营销主管Michael Distler 说道:“Windchill MPMLink 使制造工程师能与设计工程师同时访问相同的工具。变更管理就是一个例子。Windchill 具有可靠的变更管理系统,能自动完成变更请求和通知过程。通过使用Windchill MPMLink,制造工程师不仅能够立即知道任何设计变更,而且Windchill 的关联性本质还使这些变更能自动地在他们的过程计划中反映出来。他们不再需要发送电子邮件、另外打电话或者下载新的模型,以了解对产品进行了哪些修改。”

    新的变更管理功能。工程师将会在Windchill 9.0 中看到许多新的功能。例如,设计工程师现在可以使用Windchill 来处理产品的偏离和超差问题(这些问题属于制造性差异的范围)。

    如果发现将使用非标准的辐条来制造自行车的车轮,则会发生差异。如果制造工程师在开始生产车轮之前发现此错误,则他或她会要求进行偏离变更。但如果生产了此非标准的车轮,并且质量检验员发现了此错误,则该检验员会要求进行超差变更。

    Windchill 9.0 现在为工程师提供了特定的功能(审查和批准工作流),以执行及记载更正此类偏离和超差问题所需的措施。

    附加的Pro/ENGINEER数据管理功能 – Pro/ENGINEER 数据管理功能最初是随Pro/INTRALINK 8.0 引入的,现在,此功能的下一代版本在现代化的Windchill 体系结构之上已经成熟。新的功能包括“工作区另存为”(带有“替换”和“更新父项”选项)、从工作区导入/导出对象、改进的基线功能,以及并非基于文件的属性。预计这些功能将得到非常广泛的使用。例如,新的设计通常基于现有的某个模型。这需要轻松创建CAD 模型的副本并同时保持它们的必要关联性的能力。 Windchill 9.0 允许设计工程师在其工作区内复制任意多的设计,而且无需向数据库提交不需要的数据。工程师还能够在创建副本时替换元件,以及根据需要更新父副本。

    轻松处理变型产品。 Windchill 9.0 还为设计师提供了一些新的工具,使他们能更轻松地应付许多不同的客户需求。

    对于为大客户对产品进行个性化的制造商,Windchill 9.0 现在允许工程师在产品配置数据库中声明“通用”和“变型”零件。之后,工程师定义有关如何将特定的元件组合起来的规则。这可让工程师建立通用产品的基础,而这些产品随后可充当为客户开发整个变型配置系列的基石— 只要改变单个元件即可。

    Distler 说:“这节省了大量的时间,因为无需验证某个特定配置是否可行以及是否经济高效。”

    用户界面的改进。 Windchill 9.0 具有强大、基于角色的用户界面配置功能,包括改进的表单和表格、工作流改进以及对Adobe 表单的支持。系统管理员有望看到简化的安装过程和附加的系统监控工具,这些工具利用了行业标准的Java 扩展和框架。

    Distler 说:“这些改进对于已使用Windchill 的工程师非常好。但是,它们对于那些以前可能没有Windchill 使用经验的人特别有用,因为人机交互现在变得简单得多。”

    ProductView简易版。 Windchill 9.0 内嵌了新版本的ProductView 简易版,此版本在加载、交互和分发可视化数据方面的性能有了显著改善。为此,ProductView 简易版采用了新的压缩技术,不仅显著改善了传送速度,还提高了存储容量。

    Distler 说:“ProductView 简易版是适用于所有协作类型的重要工具。它在设计团队的会议中使用,供执行官审查和签核设计,以及供其他部门认识产品的未来外观。它对于分散在各地的团队特别重要— 例如,对于外包的产品制造业务。在类似于此的应用场合中,团队成员经常需要互相发送大量的信息。如果能够可视化非常大的产品表示形式,并且在这样做时能获得很高的性能,这是非常好的。”

    业务报告。 Windchill 9.0 中提供了基于Cognos 8 Business Intelligence 技术的全新报告框架。 Cognos 8 含有一系列自助式报告类型、支持众多报告分发方法,并具有可靠的多语种功能。新的Windchill 报告功能包括在Windchill PDMLink 中预先建立的标准报告。此外,还提供了一个称为Windchill Business Report Author 的可选的报告创作软件包,它用于创建更高级的报告,那些想创建自己的报告的公司将会对它感兴趣。

    宏观的解决方案。 Distler 表示,Windchill 9.0 设计为帮助设计工程师、制造工程师以及项目规划者、公司经理和执行官开展工作。

    他说道:“Windchill 9.0 在许多方面都很好地满足了公司的需求,帮助它们在诸如变更和配置管理、详细设计、变型设计和生成、设计外包和技术资料出版等领域中改进整体产品开发过程。这些都是宏观的需求,而Windchill 提供了宏观的解决方案。”

    快速轻松地查看、测量和标注大型的模型

    r

    使用Windchill MPMLink 中的可视化配置工具创建数字化过程计划

    f

    2008 - 06 - 15

    客户端远程调用服务器方法

    关键字: windchill pdm plm 二次开发系统remote

    调用客制化方法出现如下异常信息

    WARNING: The ManagerService is not initialized!  This can be caused by:
    1) Attempting to invoke a server only method from a remote client
    2) Attempting to invoke a method on a service from the constructor or static initializer of another service

    相关实现代码:

    jsp
    .......
    [td]//<td>
    //<% ContentItem item = GotoObject.getContentItemfromContentHolder(pt);
    //if(item!=null){

    //%>
    //<%=item.getDisplayIdentifier().getLocalizedMessage(Locale.CHINA)%>-<%=item.getFormatName()%>-<%=item.getDescription()%>-<%=item.getBusinessType()%><%}%>
    //</td>
    if(item!=null){%>
    ---
    [/td]
    .......

    GotoObject.java
    ......
    public static ContentItem getContentItemfromContentHolder(ContentHolder contentHolder){
    if(contentHolder==null){
    return null;
    }
    EPMDocument epm=null;
    if(contentHolder instanceof WTPart){
    epm = getEPMDocumentByWTPart((WTPart)contentHolder);
    System.out.println("epm is ======="+epm);
    }else if(contentHolder instanceof EPMDocument){
    epm = (EPMDocument)contentHolder;
    System.out.println("epm is ======="+epm);
    }
    try{
    if(epm!=null){
    epm = (EPMDocument)ContentHelper.service.getContents(epm);
    Enumeration enum = ContentHelper.getContentListAll(epm).elements();

    while (enum != null && enum.hasMoreElements())

    {
    ContentItem item = (ContentItem) enum.nextElement();
    if(item !=null){
    ApplicationData data=(ApplicationData)item;
    try{
    ContentServerHelper.service.writeContentStream(data, "c:" + File.separator + data.getFileName());
    }catch(Exception e){
    e.printStackTrace();
    }
    return data;
    }
    }
    }
    }catch(PropertyVetoException e){
    e.printStackTrace();
    }catch(WTException ex){
    ex.printStackTrace();
    }
    return null;
    }
    ........

    因为使用了ContentServerHelper中的函数。

    getContentItemfromContentHolder()函数只能在服务端的class中调用。

    如果要在jsp中直接调用,需要采用远程方法调用。

    如:

    RemoteMethodServer.getDefault().invoke("getContentItemfromContentHolder",null,......);

    2008 - 06 - 15

    windchill_jsp_actions

    关键字: windchill pdm plm 二次开发系统action

    客制化一些Action步骤,详见附件

    2008 - 06 - 15

    如何按自定义的文档类型搜索

    关键字: windchill pdm plm 二次开发系统类型

    sc2= new SearchCondition(WTDocument.class, WTDocument.NUMBER, SearchCondition.LIKE, number, caseSensitive);
    qs2.appendSearchCondition(sc2);

    qs2.appendAnd();
    sc2 = new SearchCondition(WTDocument.class,  WTDocument.NAME, SearchCondition.LIKE, name, caseSensitive);
    qs2.appendSearchCondition(sc2);

    qs2.appendWhere(new SearchCondition(WTDocument.class,WTDocument.TYPE_DEFINITION_REFERENCE + "." + TypeDefinitionReference.KEY + "." +
    TypeDefinitionForeignKey.BRANCH_ID,
    SearchCondition.EQUAL, "tudang"
    ), new int[]{0});

    文档软类型的名称一般会带着windchill系统的网络标识id,例如:com.ptc.dudang

    将“tudang”修改为“WTTYPE|wt.doc.WTDocument|com.ptc.tudang”、wt.doc.WTDocument|com.ptc.tudang”、“com.ptc.tudang”都是搜索不到内容。

    须到类型管理器中看该文档类型的'名称"是什么。例如,我的系统是:harry.com.tudang

    jeans
    搜索本博客
    最近加入圈子
    存档
    最新评论