Jump to content

PCM help with Array


---
 Share

Recommended Posts

A customer uses some PCM files to control reports, I am falling into an issue where the PCM will crash.
I have narrowed down a few things that will cause the PCM code to crash, but I can't figure why.
I'm pretty sure it has to do with the Array.
1. Using Patterns in a feature related to a Characteristic.
a. It seems the index of the pattern for each iteration causes the PCM to crash.

2. Using BestFit in True Positions
a. Same scenarios with indexes as in 1a above.

3. many Symbols such as #, @ cause the PCM to crash. (I have removed all such symbols).

4. Naming of Characteristics, the naming used in the images shown work in 7 of 8 programs, so I do not think in this case it is an issue.

5. I have narrowed the crash issue down to two specific Groups.
Example group name: Intake_334.x12 points and Exhaust_343.x12 Points
I do not believe the Group Name is part of the issue.
a. For the customers PCM to work, characteristics must be in Groups. (They use two Report Protocol files).

The PCM crashes at the portion of code:

Please sign in to view this quote.

See image for actual error dialog box.: Access Attribute not allowed.jpg

Note, once this dialog box appears, it is in a loop through all characteristics in the program. In my case, that's 941. It also seems to loop between 6 to 12 times per characteristic. The only way out is to "End Task" Calypso.
I'm sure you can imagine hitting the OK button nearly 6k times.... 😱

PCM file name: calculation_end_pcm.txt
PCM code.
defineFunctionStart("SET_CFAttribute")
MyName=getFunctionObjectName()
GroupName=getCFGroupname2(MyName)
GroupNameINOUT=true
myArray=getCFNames(GroupName).asArray.asString
for i=1 to getCFNames(GroupName).size
charName = strElement(i*2,"'",myArray)
if getActual(charName).inTolerance == false
GroupNameINOUT=false
endif
next i
setCFAttribute("u_{2403}","IN") 
if GroupNameINOUT == false
setCFAttribute("u_{2403}","OUT") 
endif
CF_Attribute="IN"
if GroupNameINOUT == false
CF_Attribute="OUT"
endif
defineFunctionEnd("CF_Attribute")
generateTableColumn("u_2403","SET_CFAttribute")
As always, all help is appreciated.

Access Attribute not allowed.jpg

Link to comment
Share on other sites

New info:
The True Position is Rectangular", when I switch to "Diametral" it runs thru the PCM.

Although it appears I have found a way thru the PCM, it would be helpful if I can understand why the scenarios I've provided cause the PCM to fail.
Link to comment
Share on other sites

  • 3 weeks later...
Additional information.
I have found with the PCM posted, that the "Best Fit" characteristics can cause the PCM to crash when in a "group" or within a "sub group".
The crash is the same as the original post.
Link to comment
Share on other sites

 Share

×
×
  • Create New...