[Mi...] Posted November 17, 2025 Share Posted November 17, 2025 (edited) Hi, is there a way to define a custom list keyword type in the SW2023 in the json file? I would like to offer the user more options for a keyword but do not want to allow free string in that field. For example nest of the injected part could be just only: A, B or C (no other choices). I mean a json like this (but it does not work so): { "content": { "": [ { "description": "Nest", "key": "nest", "type": "list", "value": ["A", "B", "C"] }, ... Thanks! Edited November 17, 2025 Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/ Share on other sites More sharing options...
[Ma...] Posted November 17, 2025 Share Posted November 17, 2025 I think you can not modify this. But you can make your own dialog for headers to have more control over input. 1 Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/#findComment-142081 Share on other sites More sharing options...
[De...] Posted November 17, 2025 Share Posted November 17, 2025 I dont think you can make project keywords anything other than a string, date, or number. you could present the user with a dialog, and feed the result of that dialog into a project keyword? 1 Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/#findComment-142129 Share on other sites More sharing options...
[Mi...] Posted November 20, 2025 Author Share Posted November 20, 2025 Yes, but for that I have to do some Python exercises. At the moment I am not very practiced in that. But it seems that I have to get familiar with it... 🙂 Thank you! Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/#findComment-142343 Share on other sites More sharing options...
[Na...] Posted November 20, 2025 Share Posted November 20, 2025 If you are using the Kiosk interface, it's easy: You just have to drop a selection list and edit the entries. The Dialog is already part of the Kiosk: 1 Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/#findComment-142357 Share on other sites More sharing options...
[Ra...] Posted January 7 Share Posted January 7 Yes you can, you just need to use the proper variables (Items). diag={ "content": [ [ { "columns": 1, "default": "A", "items": [ { "id": "", "text": "A", "translatable": True }, { "id": "", "text": "B", "translatable": True } ], "name": "list", "rows": 1, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "input::list" } ]... .... I wrote out a taught script to a json file, edited it Notepad++, read it back in, and it worked fine. Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/#findComment-144251 Share on other sites More sharing options...
[Ra...] Posted January 7 Share Posted January 7 Also, if you have a dialog defined with a list named "partlist" once the dialog is loaded you can add a list of items. part_list = ['nut','bolt','washer','lock washer'] DIALOG.partlist.items = part_list Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/#findComment-144265 Share on other sites More sharing options...
[Mi...] Posted January 8 Author Share Posted January 8 Hi Please sign in to view this username. , thank you for your answer. It is not clear for me but is this solution relates to the keyword set in the add-on environment (see attached pic, red marking)? I ask because the structure of your file looks a bit different and I do not know how to implement it in the keyword set JSON. My text starts with "content" and your descriptiopn is with "diag". Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/#findComment-144285 Share on other sites More sharing options...
[Ra...] Posted January 12 Share Posted January 12 I edit the json file in Notepad++, the easier method is the second one I noted. You can program the keyword list in your Python script. Link to comment https://qualityforum.zeiss.com/topic/25117-project-keyword-definition-list-type/#findComment-144471 Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in