MeTheMachine Posted March 7, 2023 Share Posted March 7, 2023 Based on an earlier script/post about selecting lighting objects by universe... http://[https://forum.vectorworks.net/index.php?/topic/102718-selecting-lighting-objects-by-universe/#comment-449004] Is it possible to select lighting device by a range of channel numbers? For instance 101-103 Using the script from before, how would I loop through and parse the dialog a user enters. import vs vs.DSelectAll() channelRange = vs.IntDialog("Enter a fixture number range", 1) vs.SelectObj("INSYMBOL & INVIEWPORT & ('Lighting Device'.'Channel'='{}')".format(channelRange)) Any guidance would be appreciated.. Quote Link to comment
JBenghiat Posted March 7, 2023 Share Posted March 7, 2023 Check out AutoPlotVW. This is just one of the many useful commands you can find in its roster. http://autoplotvw.com Criteria can't accept a list of options. You can parse the input string, and if it's in the format (\d+)-(\d+), construct criteria that links something like: ((('Lighting Device'.'Channel'<='103') & ('Lighting Device'.'Channel'>='101'))) but that won't handle non-contiguous ranges the way AutoPlot can. Unless you want to develop the script for learning purposes or as a step for a more complex script, AutoPlot will be well worth the potential hours spent. Quote Link to comment
Sam Jones Posted March 7, 2023 Share Posted March 7, 2023 AutoPlot's "Select by Channel Ranges" command http://www.autoplotvw.com/APSL_Download.asp Quote Link to comment
MeTheMachine Posted March 9, 2023 Author Share Posted March 9, 2023 Yes! Thank you I forgot about this! 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.