Enabling the use of Metadata Mapping
This metadata mapping feature is not enabled through any of the UI based application that make use of I/X. You must programmatically enable it by setting the flag on the ImportConextData.

ObjectImportParameters objectimportparameters =
new ObjectImportParameters();
ImportContextData importcontextdata = (ImportContextData)
objectimportparameters.getContextData();
importcontextdata.setUseExtendedMapping(true);
//By default, the extended mapping is always disabled
Once the metadata mapping is enabled as extended mapping, the lastKnownDomainRepository is needed to be set to identify the Preference Client to be used for the candidate mapping rules (defined as MultiValuePreferenceInstances) to be evaluated for a given metadata (hence XML tags in the form of XPATH) target value. There is a precedence in how the lastKnownDomainRepository could be set.
Set in the manifest file that is included in the bundle that contains the STEP file to be imported. An example of the manifest file is as follows.

jar-in-jar=false

windchill-version=11.0.10.00.235

standard-dtd=standardX26.dtd

format=STEP

multiple=true

lastKnownRepository=536416322-1456322554305-2141932519
-203-136-220-10|mapping-test.ptcnet.ptc.com
If it cannot be determined from the manifest file, the lastKnownDomainRepository can be set on the ImportContextData.
importcontextdata. setLastKnownDomainRepository
(‘536416322-1456322554305-2141932519-203-136-220-10|
mapping-test.ptcnet.ptc.com’);
If it still cannot be determined, the OriginatingSystem from the header in the STEP file is used to set the lastKnownDomainRepository.
Otherwise, extended mapping is as good as disabled as the Preference Client is in-deterministic.
¿Fue esto útil?