Re-order post properties list

Don.Cyr
Collaborator
Collaborator

Re-order post properties list

Don.Cyr
Collaborator
Collaborator

A bit confused about how the post properties are organized, I have them in the post the way I would like to see them in my NC program window, but they are out of place. The post manual lists these as being in groups which I see but they also show "order" with group numbers which my post doesn't have (Haas NGC). can someone explain how to do this? Thanks in advance.

DonCyr_0-1705596937383.pngDonCyr_1-1705596952674.png

 

Please click "Accept Solution" if I helped with your question or issue.
0 Likes
Reply
Accepted solutions (1)
300 Views
4 Replies
Replies (4)

viacheslav.shapilov
Autodesk
Autodesk
Accepted solution

Hello, @Don.Cyr .

Short answer: you can specify groups order, but there is no way to specify properties order inside group.

 

Long answer:

Group order can be specified in group specification like this:

groupDefinitions = {
  looping: {title:"Looping", collapsed:true, order:25}
};

Groups will be sorted by "order" property. And there are several predefined group, that you can use:

standardGroupDefinitions = 
  operation    : {title: "Operation", description: "Operation options", collapsed: true, order: -1}, 
  configuration: {title: "Configuration", description: "Configuration options", collapsed: true, order: 10},
  preferences  : {title: "Preferences", description: "User preferences", collapsed: false, order: 20},
  homePositions: {title: "Safe retracts and home positioning", description: "Settings related to safe retracts and home positioning", collapsed: true, order: 30},
  multiAxis    : {title: "Multi-axis", description: "Multi-axis settings", collapsed: true, order: 40},
  formats      : {title: "Formats", description: "NC code format settings", collapsed: true, order: 50},
  probing      : {title: "Probing and inspection", description: "Probing and inspection settings", collapsed: true, order: 60}
};

In the above example "order" is 25, and group will be inserted between "Preferences" and "Safe retracts and home positioning".

 

Officially, there is no way to sort post properties inside groups. But internal implementation actually sorts them in alphabetical order of their IDs. So, if you want to change order, you can prefix number before property ID like "_0suppressZHome". But don't rely on this behaviour, as it can be broken.


Viacheslav Shapilov
Developer Technical Services
Autodesk Developer Network


0 Likes

Don.Cyr
Collaborator
Collaborator

@viacheslav.shapilov Thank you.

Please click "Accept Solution" if I helped with your question or issue.
0 Likes

ktorokU233T
Advocate
Advocate

@viacheslav.shapilov wrote:

Officially, there is no way to sort post properties inside groups. But internal implementation actually sorts them in alphabetical order of their IDs. So, if you want to change order, you can prefix number before property ID like "_0suppressZHome". But don't rely on this behaviour, as it can be broken.


good reason for Autodesk to add the order property for sorting to the post properties as it has been done for the group sorting. Hacking variable names to get them to sort in an orderly fashion for human consumption is so 1900ish. Time to move into the 21st century. And for us compulsive types that have to have them sorted in a certain order to now find out this alphabetical sorting can be broken after spending all this time maintaining our properties in an orderly fashion is rather depressing. Especially if there is no alternative, like a sort property.

0 Likes

viacheslav.shapilov
Autodesk
Autodesk
Totally agree, that's why I said: "Don't rely on it".
Technically, this sorting is not even intentional. It is just a side effect of internal data storage. Nobody implemented it explicitly.
We can consider to implement mechanism similar to groups sorting. But it is not very convenient when you have a lot of properties anyway.

Viacheslav Shapilov
Developer Technical Services
Autodesk Developer Network


0 Likes