Community
HSM Post Processor Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reading Property

3 REPLIES 3
Reply
Message 1 of 4
ktorokU233T
182 Views, 3 Replies

Reading Property

So if I define a new property in the post property table and add "operation" to the scope:

testprop.JPG

If I change the value in an operation dialog, when posted from F360, it then passes the following (taken from a dump file):

testpropdump.JPG

What is the proper syntax to access this property passed in from the post process tab of the operation dialog?

I have tried:

currentSection.getProperty("operation_post_property:testProperty1") <<<returns undefined

currentSection.getProperty("testProperty1") <<<returns the "global" post value of 0

getProperty("operation_post_property:testProperty1") <<<returns undefined

getProperty("testProperty1") <<<returns the "global" post value of 0

 

I either get the "default" value and not the changed value with the getProperty methods or an undefined as a value.

 

When I try various getParameter variations or trying to catch it in the OnParameter section, I have only managed to make the post fail or see no results.

 

Any help or direction would be greatly appreciated.

 

Ken

 

 

 

3 REPLIES 3
Message 2 of 4

You may have to parse the id values of the object array:

 

if (getProperty("testProperty1") == "1") {
  ... some code
}

 

 

Also just a friendly suggestion consider changing the title to something more searchable, i.e., "How to access a user defined property"

 

If you feel your question was answered, please accept it as a solution. Thanks!
Message 3 of 4

Hi @ktorokU233T 

There are two methods to get the property value the correct syntaxes are 

getProperty(property [,default-value])
section.getProperty(property [,default-value])

 You can find more details post processor training guide - Accessing properties

 

And if a property is defined as a post and an operation property, then the setting made in the NC Program dialogs will be ignored by the post processor, only the setting made in each separate operation will be used by the post processor. The only place you would be able to query the Post Process property setting is in onOpen when using the getProperty function. 

you can get more info in the post processor training guide - properties scope

So in that case if you are calling getProperty in onOpen section it will always return the property value set in the nc program dialog.

 


Boopathi Sivakumar
Senior Technology Consultant

Message 4 of 4
ktorokU233T
in reply to: ktorokU233T

Thank you both @componentscience and @boopathi.sivakumar for your answers.

After a few hours of swearing and beating my head on the desk, a few more cups of coffee, and dozens of lines of debug only code, it all came back to operator error and an overlooked mismatched machine definition to post processor. Once that was straightened out, all worked as expected. I gotta stop trying to update more then 1 post at a time.

 

Ken

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report