Jump to content

Recommended Posts

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.

Link to comment

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)

Link to comment
  • Vectorworks, Inc Employee

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.

  • Like 1
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...