-- Export lighting cues and levels to CSV for import into EOS
tell application id "com.figure53.QLab.5" to tell front workspace
set nl to linefeed
-- define the mapping to EOS parameter numbers
-- if you are using more parameters other than RGB you will need to find the number from EOS and add them here
-- note some parameter numbers can be 1000s (X-Focus) and this scheme may be impractical in those cases.
set paramNames to my blankArray(14)
-- here we just assume only RGB fixtrues are in use
set item 1 of paramNames to "Intens"
set item 12 of paramNames to "red"
set item 13 of paramNames to "green"
set item 14 of paramNames to "blue"
---- initalise the first two rows for cues csv data
set ecuerows to {"START_TARGETS"}
set end of ecuerows to "TARGET_TYPE,TARGET_TYPE_AS_TEXT,TARGET_LIST_NUMBER,TARGET_ID,TARGET_DCID,PART_NUMBER,LABEL,TIME_DATA,UP_DELAY,DOWN_TIME,DOWN_DELAY,FOCUS_TIME,FOCUS_DELAY,COLOR_TIME,COLOR_DELAY,BEAM_TIME,BEAM_DELAY,DURATION,ALERT_TIME,MARK,BLOCK,ASSERT,ALL_FADE,PREHEAT,FOLLOW,LINK,LOOP,CURVE,RATE,EXTERNAL_LINKS,EFFECTS,MODE,CUE_NOTES,SCENE_TEXT,SCENE_END,WIDTH,HEIGHT"
-- add the cue list target (at top and bottom)
set elistrow to my blankArray(37)
set item 1 of elistrow to 15 -- cue list target
set item 2 of elistrow to "Cue_List"
set item 4 of elistrow to 1 -- cue list 1
set AppleScript's text item delimiters to ","
set end of ecuerows to (elistrow as text)
-- define a default eos cue row
set decr to my blankArray(37)
set item 1 of decr to 1 -- cue target
set item 2 of decr to "Cue"
set item 3 of decr to 1 -- cue list 1
----- initalise the headers for levels CSV data
set elrows to {"START_LEVELS"}
set end of elrows to "TARGET_TYPE,TARGET_TYPE_AS_TEXT,TARGET_LIST_NUMBER,TARGET_ID,TARGET_PART_NUMBER,CHANNEL,PARAMETER_TYPE,PARAMETER_TYPE_AS_TEXT,LEVEL,LEVEL_REFERENCE_TYPE,LEVEL_REFERENCE_TYPE_AS_TEXT,LEVEL_REFERENCE_LIST_NUMBER,LEVEL_REFERENCE_ID,FADE_TIME,DELAY_TIME,MARK_CUE,TRACK_TYPE,EFFECT"
-- define a default row for the levels data
set dr to my blankArray(17)
-- set common standard columns of EOS CSV output
set item 1 of dr to 1 -- target type
set item 2 of dr to "Cue"
set item 3 of dr to 1 -- cue list 1
-- loop through the lighting cues in this workspace
repeat with lxcue in (cues whose q type is "light")
-- get the cue number and check it is numeric (non-numeric cue numbers are ignored)
try
set cueNum to q number of lxcue as number
on error errMesg
display notification errMesg with title "Non-numeric cue num " & cueNum
end try
-- catch the case where cue numbers are not numbers, otherwise this will break
-- TODO you many want to remove 'LX' prefix if used here
if (class of cueNum is integer) or (class of cueNum is real) then
-- put the cue data (cue num, cue name, duration) into its row
set ecrow to decr
set item 4 of ecrow to cueNum
set item 7 of ecrow to (q display name of lxcue as string)
-- this is the Up Time duration ...
set item 8 of ecrow to (duration of lxcue)
-- ... EOS supports lots of timings, so the duration is in the CSV file again
set item 18 of ecrow to (duration of lxcue)
set AppleScript's text item delimiters to ","
set end of ecuerows to (ecrow as text)
set elrow to dr
-- get the lighting command text of the lighting cue (of the form ch = level eg 8 = 45 each channel parameter on its own line)
set lxlines to paragraphs of (command text of lxcue as string)
repeat with cl in lxlines
set w to words of cl
try
set ch to item 1 of w
-- Qlab lighting commands sometimes include a parameter (eg red) but if just intensity, it is omitted.
-- NOTE: if you have used references to other cues, this is not deall with here and will break! or give unpredicatable results
if (item 2 of w) is "=" then
-- intensity
set lev to item 3 of w
set pnum to 1
set pdesc to "Intens"
else
-- non-intensity parameter
set pdesc to item 2 of w
set lev to item 4 of w
end if
-- grab the Eos parameter number (for rgb, pan, tilt etc) from the paramNames list using custom function
set pnum to my indexOf(paramNames, pdesc)
-- update the essential columns in the eos row
-- col 4 is cue num, col 6 is channel, col7 is eos parameter num, col 8 is param desc, col 9 is the level
-- 6 is ch, 7 is param num, 8 param desc, 9 is level
set item 4 of elrow to cueNum
set item 6 of elrow to ch
set item 7 of elrow to pnum
set item 8 of elrow to pdesc
set item 9 of elrow to lev
set AppleScript's text item delimiters to ","
-- append this data to the cumlative eos row data
set end of elrows to (elrow as text) as string
end try
end repeat
else
display notification "skiping cue as non numeric cue number"
end if
end repeat
set AppleScript's text item delimiters to ","
set end of ecuerows to (elistrow as text)
--set AppleScript's text item delimiters to linefeed
set end of ecuerows to "END_TARGETS"
set end of elrows to "END_LEVELS"
-- get the Worksapce name to use in file name
set AppleScript's text item delimiters to "."
set workspaceName to first text item of ((q number) as string)
set basename to workspaceName & "_export4Eos"
set AppleScript's text item delimiters to linefeed
display dialog "Export Lighting to EOS as CSV" & linefeed & basename & linefeed & (ecuerows as text) with title "Export to file"
end tell
-- now export the lines to files for cues and levels
set cues_filepath to POSIX path of (path to desktop) & basename & "_cues.csv"
set levels_filepath to POSIX path of (path to desktop) & basename & "_levels.csv"
try
set myfile to open for access cues_filepath with write permission
write (ecuerows as text) & linefeed to myfile
--write (elrows as text) & linefeed to myfile starting at eof
on error e
display dialog e
end try
try
set myfile to open for access levels_filepath with write permission
write (elrows as text) & linefeed to myfile starting at eof
display dialog "Lighting data exported as CSV for EOS to " & nl & cues_filepath & nl & levels_filepath with title "Export finished"
on error e
display dialog e
end try
on indexOf(myList, myitem)
repeat with n from 1 to length of myList
if item n of myList is myitem then
return n
end if
end repeat
return 0
end indexOf
on blankArray(numEl)
-- generate an array with num of elements
set A to {}
repeat with n from 1 to numEl
set end of A to ""
end repeat
return A
end blankArray
On Nov 17, 2025, at 5:41 PM, Paul <paulthom...@gmail.com> wrote:
Caution - This email is from outside ORCSD. Do not click links or open attachments unless you recognize the sender and know the content is safe.
--
Contact support anytime: sup...@figure53.com
User Group Code of Conduct: https://qlab.app/code-of-conduct/
Instagram: https://www.instagram.com/Figure53
TikTok: https://www.tiktok.com/@QLab.app
Bluesky: https://bsky.app/profile/qlab.app
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qlab/0bc98121-28b0-4c27-88c9-ba417506eb64n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qlab/2164bd13-ed17-43b7-b7b4-a907b70f289cn%40googlegroups.com.
tell application "System Events" to tell (first application process whose bundle identifier is "com.figure53.QLab.5")
tell window "DMX Status"
set allValues to value of UI elements
end tell
end tell
set currentTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to space
set DMXlevels to items 1 thru 512 of allValues as text
set AppleScript's text item delimiters to currentTIDs
Thanks,On Nov 20, 2025, at 7:45 AM, Alexander (Mailing List) Taylor <ataylo...@orcsd.org> wrote:
I used your cue as a starting off point. I ended up rewriting it to export all the cues -> channels -> parameters in JSON, so I could do batch changes easily. It's 79 cues, so not a ton, but not nothing either. What's throwing me at the moment is the differentiation (or lack thereof) between groups and fixtures in QLab. I guess the simple thing would be to rename the fixtures to EOS channel numbers and the groups as well. QLab doesn't update the cues to reflect fixture name changes automatically though.
To view this discussion visit https://groups.google.com/d/msgid/qlab/916414FB-CB40-41F9-8718-2B49B923E020%40orcsd.org.
On Nov 21, 2025, at 10:51 AM, micpool <m...@micpool.com> wrote:
Are you looking at the wrong Universe?
To view this discussion visit https://groups.google.com/d/msgid/qlab/0f77c481-1507-425e-aaa4-a88e427487aan%40googlegroups.com.
That was my first thought, there's only one in use though. I tried cycling through the first few and all but 0/0/0 were 0 values.AlexanderSent from my iPhone!On Nov 21, 2025, at 10:51 AM, micpool <m...@micpool.com> wrote:Are you looking at the wrong Universe?
On Nov 21, 2025, at 11:08 AM, Alexander R. Taylor <alexand...@orol.org> wrote:
That was my first thought, there's only one in use though. I tried cycling through the first few and all but 0/0/0 were 0 values.
So, it's far more simple and embarrassing. I hadn't realized the rental license on this machine had expired.
It would be nice if there was a warning on the DMX output window that said "License limited to 16 outputs" or something.
--
Contact support anytime: sup...@figure53.com
User Group Code of Conduct: https://qlab.app/code-of-conduct/
Instagram: https://www.instagram.com/Figure53
TikTok: https://www.tiktok.com/@QLab.app
Bluesky: https://bsky.app/profile/qlab.app
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qlab/8a2a605f-3501-4689-b759-34a8225e1a4cn%40googlegroups.com.