michaelk Posted August 7, 2017 Share Posted August 7, 2017 I'm writing a script that automates an action that I need to repeat approximately a gazillion times in a drawing. One of the steps is Modify > Drafting Aids > Simplify Polys… > Maximum Deviation 1" Can't get DoMenuTextByName to call the Simplify Polys dialog, and I'm not seeing a real way to script it. Any advice? MK Quote Link to comment
Kevin McAllister Posted August 7, 2017 Share Posted August 7, 2017 How about stealing the code from the Clean Up Poly Marionette node? (Screen shot below) Kevin Quote Link to comment
michaelk Posted August 8, 2017 Author Share Posted August 8, 2017 That seems like it would work. What am I misunderstanding about DoMenuTextByName? Or is there just a limitation to that function that doesn't go that deep into the chunks? Quote Link to comment
Pat Stanford Posted August 8, 2017 Share Posted August 8, 2017 I don't think DoMenuTextByName actually works on anything in Chunks unless there is a specifically defined chunk. Drafting Aids is not a defined chunk, so I don't think you can get to it. Try creating a new menu with that command at the top level and see if you can get to it from there. 1 Quote Link to comment
michaelk Posted August 9, 2017 Author Share Posted August 9, 2017 Thanks, Pat. What an elegant idea. Now that you've said it, it seems blindingly obvious. But it would never have occurred to me :-) I managed to do 1 gazillion operations with the script I had. Next time I'm trying that! mk Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.