Jump to content

Editing a pattern with PCM


---
 Share

Recommended Posts

Does anyone know if you can edit a pattern with PCM? I would like to change the "exclude indexes" value of the pattern base on what mini plan is selected.

Thanks.
Link to comment
Share on other sites

I think this must be possible, just need to research further - I'm interested as well.

What can be done in the meantime is create 2 features that use separate patterns, you will likely need to use different characteristics as well, which will run the appropriate feature when the proper mini-plan is selected.

Edit : I've found how to get (or read) the name of the pattern :
getNominal("Circle1").measElement.basicGeometryOrNil.pattern.identifier
and how to get ( or read) the missing indexes :
getNominal("Circle1").measElement.basicGeometryOrNil.pattern.gaps
to write to these may be more difficult and will require some 'hidden' PCM. You think if there is a getNominal there would also be a setNominal but there is not... I'll do some more research.
Link to comment
Share on other sites

Hello!

Use at your own risk! 🙂
feat="Point1"  // feature with pattern

// the indices to be excluded can be gathered in a list
// first convert the list into a Set in order to exclude dublicates
gaps=list(1,1,1,8,2,3,4,5).asSet.asArray 
//gaps=list().asArray    // remove all excluded indices

executeCode("(Zeiss.Calypso.OMInspection active measElements nodeNamed: '"+ feat + "') basicGeometryOrNil pattern gaps: (" + gaps + " asSortedCollection).")
Link to comment
Share on other sites

 Share

×
×
  • Create New...