I am working on some coding to Link an EPMDocument to a WTPart, and then build the WTPart structure. I've got the association portion working but am having difficulty with the build task. I found this in the Windchill API to build structures:
BuildHelper.service.buildTarget(WTCollection alwaysBuild, WTCollection buildIfNotAlreadyBuilt, BuildResolverDelegate buildResolverDelegate, ConfigSpec configSpec)
I feed this a collection containing my working copy of the WTPart, and it appears to run without issue.
It returns a WTValuedMap, which I am not familiar with. My question is there any I need to do with the WTValued Map to update the working copy of my WTPart object prior to service.checkin? Or has anyone had any success with using the BuildHelper.service ?
\\create WRK_Prt = workingcopyof (OBJ_Prt)
\\Create links to EMPDoc
\\add WRK_prt to WTCollection alwaysBuild. No buildresolverDelegate, no config spec.
WTValuedMap myMap = BuildHelper.Service.BuildTargets(alwaysBuild)
\\CI_Prt = ...service.check(ONJPrt)