Filtering PDM menu command
Filtering PDM menu command
My searches haven't yielded any results so I thought I'd just ask the question. I know you can filter a custom PDM menu command based on file or folder selection and single or multiple selection. But does anyone know of a way to change the availability of a menu command based on the file type. I have an STP conversion command but I wanted to have it unavailable if the user selected a drawing file. Similarly, I have a DXF conversion command that I would want unavailable when the selection is an assembly or part file.
Re: Filtering PDM menu command
I don't think there's a way to disable a menu command. I would recommend performing a validation of the selection once a user clicks that command before running the STP conversion on a file.
A couple of examples:
1. If the selection contains a non-sldprt file then pop up an error that says the user cannot run that command on a file that isn't a sldprt.
2. If the selection contains a non-sldprt file then skip over it and process all the sldprt files in the selection list.
A couple of examples:
1. If the selection contains a non-sldprt file then pop up an error that says the user cannot run that command on a file that isn't a sldprt.
2. If the selection contains a non-sldprt file then skip over it and process all the sldprt files in the selection list.
Re: Filtering PDM menu command
I currently have the code only grab the filetypes able to be converted for the selected task similar to your second selection. I was just curious if it was possible to prevent it in the menu command coding.