With the R3 release of HSM (which is coming soon) we have added new functionalities to the post processor property definitions.
The following properties are supported for the definition (might change until it will be finally released):
Property |
Property Types |
Value Type |
Description |
Default |
id (for the object itself) |
All |
String |
The identifier for the matching user defined property. |
None. |
title |
All |
String |
The short title that will be presented in the user interface. |
Defaults to the property identifier. |
description |
All |
String |
A full description of the property to be presented along with the property. |
None. |
group |
All |
Integer |
Identifier that can be used to group properties together in the user interface. |
Defaults to a unique integer. |
type |
All |
String |
Specifies the type of the property. "enum", "spatial", "angle", "number", "integer", "boolean", "file", "folder". A definition requires a type to be accepted. |
None. This is required. |
values |
ENUM, INTEGER |
Array |
Specifies the accepted values. Items of array may be the value itself or a map with the value and a corresponding title. {id:VALUE, title:TITLE}. VALUE must be of the same type as the property. And TITLE must be a String. E.g. for an enum: 'values: [{id:"a", title:”A-axis”}, {id:"b”, title:”B-axis”}]'. |
None. |
presentation |
BOOLEAN |
String |
Tells the user interface how to present the boolean type. Any of these strings are supported: “yesno”, “truefalse”, “onoff”, “10”. |
Default to On/Off. |
default_mm |
All |
Same as property |
Tells the user interface the default value to use for inch mode. |
Defaults to the property value. |
default_in |
All |
Same as property |
Tells the user interface the default value to use for inch mode. |
Defaults to the property value. |
Here are some examples:
propertyDefinitions = { isnc:{title: "Use ISNC or BNC mode", description: "Selects between ISNC (ISO NC mode) and BNC (Basic NC mode).", type: "boolean", values: ["Basic NC mode", "ISO NC mode"]} };
propertyDefinitions = { rotaryTableAxis: { title: "Rotary table axis", description: "Selects the rotary table axis orientation.", type: "enum", values:[ {title:"No rotary", id:"none"}, {title:"Along +X", id:"x"}, {title:"Along +Y", id:"y"}, {title:"Along +Z", id:"z"}, {title:"Along -X", id:"-x"}, {title:"Along -Y", id:"-y"}, {title:"Along -Z", id:"-z"} ] } };
propertyDefinitions = { machineDefinition: { title: "Machine definition", description: "Specifies the file path of the machine definition to use.", type: "file" } }
propertyDefinitions = { retractHeight: {title:"Retract height", description:"The retract height between operations.", type:"spatial", range:[0,10000], default_mm:5, default_in:0.2}, }
We will add these new features to the generic posts in the future more and more, for now these posts have sample code implemented already:
http://cam.autodesk.com/posts/?p=haas_umc-750
http://cam.autodesk.com/posts/?p=thermwood_5-axis
http://cam.autodesk.com/posts/?p=hurco
http://cam.autodesk.com/posts/?p=tormach
http://cam.autodesk.com/posts/?p=heidenhain
Awesome stuff!
Laurens Wijnschenk
3DTechDraw
AutoDesk CAM user & Post editor.
René for Legend.
That's a great addition!!! It could replace the need for "interactive post"
@AchimN Do you know if there will be a possibility to pass interactive data from the cps to the hsm post window
Ex:
In my setupsheet post I use interactive to "ask question" to the programmer ( G54, G55 ect definition ) so my setupsheet post "send" data to my interactive HTA then the HTA send data back to the setupsheet post.
but the data sended to the HTA is relative to the program I'm posting
I'm not sure if you can understand what I mean as my english is limited...
Great work. Can we get a property 'visible'? Think of properties from generic post that have
a fixed value and do not need to be displayed.
So far you have to change at least 2 lines of code.
How does the property 'group' work? Can't see anything changing.
Thanks
Will this update be compatible with Fusion 360 right away? The custom drop-down menu properties are exactly what I've wanted for optimizing my post processor.
Thanks.
@denis_q2 wrote:Great work. Can we get a property 'visible'? Think of properties from generic post that have
a fixed value and do not need to be displayed.
So far you have to change at least 2 lines of code.
How does the property 'group' work? Can't see anything changing.
Thanks
I agree, a way to hide settings that you don't want the user to mess with would be great. I've also been playing with the grouping and can't seem to get anything to change.
I added a property and it is showing up in a bold blue font. Why? Is that normal?
@timdrink01 wrote:I added a property and it is showing up in a bold blue font. Why? Is that normal?
In my experience, that is normal for a property that has been changed from the default value specified in the PP.
Kyle
Has anyone managed to get the "group" property to work? I have spent some time fiddling and it doesn't seem to make any difference to the presentation of the variables in the post window.
So far I have the code below and would expect to see myNewThing1 & 3 grouped together and myNewThing2 & 4 grouped together. However, it doesn't seem to matter what I do with the group properties the values are simply presented in alphabetical order (seemingly based on the variable name) in the fusion 360 post window.
properties = { myNewThing1: false, myNewThing2: false, myNewThing3: false, myNewThing4: false, }; // user-defined property definitions propertyDefinitions = { myNewThing1: {title:"My New Thing 1", description:"We are testing", type:"boolean", group: 1}, myNewThing2: {title:"My New Thing 2", description:"We are testing", type:"boolean", group: 2}, myNewThing3: {title:"My New Thing 3", description:"We are testing", type:"boolean", group: 1}, myNewThing4: {title:"My New Thing 4", description:"We are testing", type:"boolean", group: 2} };
Have I misinterpreted the intended outcome of the group property?
If anyone could shed some light on a way to use this grouping property and/or any other way of controlling the order in which the post window displays properties that would be helpful.