Charlie Winter Posted March 6 Share Posted March 6 Is it possible, through some scripting I would assume, to adjust to front/back sort of Lighting Devices in a drawing so they are in Channel Order when exported with MVR? A query of the objects in the drawing through a worksheet shows the objects in the order as they will appear when I import the MVR in MA3. Quote Link to comment
Charlie Winter Posted March 6 Author Share Posted March 6 (edited) Thx, @DianaK, for the quick phone chat. @Sam Jones @JBenghiat @JimWoodward @klinzey @tgooch The problem: When importing an MVR generated from Vectorworks into MA3, the only way to order your channels sequentially is to auto-sort. This may be fine for some, but I prefer to manage the sort on my own. This is a cumbersome process of cut and paste and is not sustainable on large projects. I believe that the sort for the MVR Export is based on the object stacking order in the design layer. With that info, I discovered that 'Send to Back' or 'Send to Front' affected the object order when exporting an MVR. Given this, is it possible to create a script that sorts the object stacking order based on the Lighting Device Channel? Edited March 6 by Charlie Winter Quote Link to comment
Sam Jones Posted March 6 Share Posted March 6 27 minutes ago, Charlie Winter said: Given this, is it possible to create a script that sorts the object order based on the Lighting Device Channel? I think this is possible, but I'm going to wait for others who have more chops than I to weigh in. My thoughts on it are not trivial and would probably be slow and it would take some work just to test. At a minimum Josh and Kevin will have a better idea. However, I have a question. Why do you care? Does not the MA3 order the channels no matter what order they are read in? 1 Quote Link to comment
JBenghiat Posted March 6 Share Posted March 6 (edited) This would be fairly straightforwards to script. I would use python in order to take advantage of built-in list functions. Perhaps obviously, all the lighting devices would need to be in the same layer for the stacking order to apply to the full range. - Use ForEachObject() to build a list of Lighting Devices, with a dictionary holding the handle and channel number - Sort the list by the channel - Iterate through the list, using HMoveBackward() on each handle Alternatively, the mvr file is just a zip that contains the plot as an XML file. You could write a python script that sorts the XML entries by the FixtureID element. That's probably something ChatGTP could handle. Edited March 6 by JBenghiat 2 Quote Link to comment
Charlie Winter Posted March 7 Author Share Posted March 7 @JBenghiat You were right on about ChatGPT. Especially for someone with little to no experience scripting in VW. I'm refining a script now with GPT 4.0, and getting closer. 22 hours ago, Sam Jones said: However, I have a question. Why do you care? Does not the MA3 order the channels no matter what order they are read in? @Sam Jones MA does have an auto-sort function, but I prefer to manually manage the sort. Just the way my brain works I guess. Quote Link to comment
Vectorworks, Inc Employee jcogdell Posted March 8 Vectorworks, Inc Employee Share Posted March 8 @Charlie Winter I know this isn't necessarilly helpful for the current show you're working on but have you tried asking the MA team if they can add some tools/features to the MA3 patch interface to help with this? In my experience they listen to their users and are always on the look out for way to improve their software. Quote Link to comment
Charlie Winter Posted March 8 Author Share Posted March 8 (edited) @jcogdell I could ask MA, but I think its a small wish compared to the big picture there. MA interprets the MVR in its own way, so they would have to adjust some coding, and VW generates the MVR in its own way, so some adjustments would have to be made on the VW side. Either way, someone is adjusting their code, and in my experience VW does actually win out there in being more receptive and responsive. I was successful in building my own python script that accomplishes this task. I'm going to explore using NameList or Name2Index to refine it. Edited March 8 by Charlie Winter 2 Quote Link to comment
Charlie Winter Posted March 15 Author Share Posted March 15 On 3/8/2024 at 10:42 AM, jcogdell said: have you tried asking the MA team if they can add some tools/features to the MA3 patch interface to help with this? I think this of a pretty big feature… MA introduced MVR X-change.. 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.