Jump to content

Channel Sort for MVR Export


Recommended Posts

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. 

 

Screenshot 2024-03-06 at 13.17.15.png

Link to comment
Posted (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 by Charlie Winter
Link to comment
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?

 

  • Like 1
Link to comment

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 by JBenghiat
  • Like 2
Link to comment

@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.

Link to comment
  • Vectorworks, Inc Employee

@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.

Link to comment
Posted (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 by Charlie Winter
  • Like 2
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...