Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sam Jones

VS Access to the user created fields in the Lighting Device

Recommended Posts

User creation of new OIP parameters is a unique feature of the "Lighting Device" PIO.  However...


It looks like VS cannot assign values to user created fields in the Lighting Device.  I created to new field, “Sam Field 1”  and “Sam Field 2”.  I then ran the following script, and it failed to assign the specified value.

 

PROCEDURE TestUserFieldAssignment;

VAR
    AssignVal : REAL;
    AssignStr : STRING;
    Fixture : HANDLE;
    
BEGIN
    Fixture := FSActLayer;
    AssignVal := 4359;
    AssignStr := Num2StrF(AssignVal);
    SetRField(Fixture, 'Lighting Device', 'Sam Field 2',AssignStr);
END;
RUN(TestUserFieldAssignment);

Is there a way for VS to assign values to user created fields in the Lighting Device?

 

Attached is an example file.

User_Field_Test.vwx

Share this post


Link to post

The data is there, you just need to add     

 

ResetObject    (Fixture); 

 

if you want to see the value change with Obj Info open.

Share this post


Link to post

I have dozens of scripts that do exactly this on my 20 or so user-created Lighting Device fields.  I don't recall not seeing changes in the OIP, but maybe that's true.  I did have to add a ResetObject to get the data to change on screen.

Share this post


Link to post
3 hours ago, Benson Shaw said:

+1 for that tip, Thanks Matt!

-B

^+1 as well

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×