I am trying to instantiate a machining process template using an Action and the InstantiateTemplate() function. Is this possible? The documentation does say InstantiateTemplate can be used with "Any" template. Perhaps they were not considering NC process templates when they wrote that.
If would be very cool to get this to work as I think it would allow a way to bypass the limits of the process template instantiation methods available in machining.
let lx (List)
let mp (MachiningProcess)
let mma(Mfg2DMAFeature)
lx = `Part Operation.1` ->Query("Mfg2DMAFeature","x.Name==\"SEAL_GROOVE_1\"" )
Message("found # matching prismatic machining areas",lx->Size())
for mma inside lx
{
mp = InstantiateTemplate("NCProcessARM|SEAL_GROOVE_1",`Manufacturing Program.1` )
mp->SetAttributeObject("TargetInProgramInput", `Manufacturing Program.1` )
mp->SetAttributeObject("GeometryToMachineInput",mma)
EndModifyTemplate(mp)
}