spettitt Posted April 15 Share Posted April 15 I'm trying to gain the ability to change the GDTF mode of a fixture via script. I have a GDTF loaded and assigned to fixtures in my drawing. I would like for my script to be able to get all of the available modes in the GDTF file so the user can pick. I am unsure how to locate this data for anything but the currently selected mode. Also, I can SetRField of the GDTF Mode and Num Channels no problem - but there is no validation. I can assign a mode name and footprint that doesn't exist. I'm trying to think about how I could use something more akin to a primary key than just 'Manufacturer' and 'Model' strings. I can see in the XML inside the GDTF that an Ayrton Cobra is fixture type E4F96447-2A9B-47B8-B7DA-BC4AFB17F276, but I'm unsure how to get this in Vectorworks. I can see hidden records of: __GDTFFixtureTypeID as 'Lighting Device'.'GDTF Fixture Type ID' __GDTFFixtureModeCustomID as 'Lighting Device'.'GDTF Fixture Custom ID' but these both just return '0'. Any advice appreciated. Quote Link to comment
spettitt Posted April 15 Author Share Posted April 15 I wrote a Python script that can parse the XML and get the available modes and their channels, so this may be the way forward. It would be slicker if I could get them from the GDTF in the file though, as I'm transporting the data to a non-Vectorworks user who might not have the GDTF (and probably doesn't even know what one is) Quote Link to comment
Vectorworks, Inc Employee klinzey Posted April 16 Vectorworks, Inc Employee Share Posted April 16 The list of fixture modes is built dynamically when the user click on the control. The only thing that is stored is the active selection. Some of this functionality for accessing the GDTF stored in Vectorworks is available in the SDK but it it not available in Vectorscript or Python due to the limits of the data structures of Vectorscript. 1 Quote Link to comment
spettitt Posted April 16 Author Share Posted April 16 Thanks @klinzey, understood. 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.