vl-catch-all-apply sounds like an if statement where if the property can be applied, apply it but it differs where when an error occurs it continues processing the remaining properties? What happens to the error statements?
vl-catch-all-apply is equivalent to the AutoLISP
apply function, but will catch any exceptions without crashing the program and ceasing evaluation. Therefore, this expression will attempt to apply the
vlax-put-property function to the list of arguments (i.e. attempt to set the relevant ActiveX property), without crashing the code should a property fail to be set. This is not an ideal solution but more of a 'sledgehammer' approach as some might say, since we are not actually resolving the error, but just ignoring those properties which fail.
The code is not currently using the error object returned, but the error message could be output to the user if necessary.
I also see the CanonicalMediaName was moved further down the list, how did you determine where it goes, simple trial and error?
I simply moved the properties pertaining to the plot itself to the top of the list, as other properties will depend on these plot properties (e.g.
CenterPlot depends on
PlotType etc.).