Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About EBV_Nick

  • Rank

Personal Information

  • Occupation
    Entertainment Design Developer
  • Location
    United States

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @Pat Stanford thanks! Just to be clear, how would the procedure work if FSActLayer was not there? How would it know what to run the procedure on?
  2. I finally figured it out @Pat Stanford! It took some dissecting of what was going on and some looking up of function but I finally puzzled it out. Procedure Main_Script; Var H1:Handle; B1:Boolean; ORot:Real; Procedure Callback(H1:Handle); Begin H1:=FSActLayer; ORot:=HAngle(H1); SetRField(H1,'Lighting Device','Rotate3DPosition','True'); SetRField(H1,'Lighting Device','EnableZRot','True'); SetRField(H1,'Lighting Device','zRot',Concat(ORot)); ResetObject(H1); SetDSelect(H1); End; Begin ForEachObject(Callback,(((VSEL=TRUE) & (PON='Lighting Device')))); End; Run(Main_Script); At first, I just copied the original script and used the template you gave me but I had some issues with the variables (still confused about the global vs. local variable portion of the template). After I figured that out, the script compiled successfully so I tested it out and it was only working on the first light in the selection so I realized it must have something to do with the "FSActLayer" by only looping back and running on the same first selected Lighting Device. I tried to see if I could switch that to something else and then thought of just deselecting the completed light once the Procedure completed. I found the SetDSelect procedure and it worked like a charm. Very excited! Thank you again!
  3. So I went ahead and tried my best to define each part of the script for my understanding and learning process: (comments posted after each line) Procedure LDRotation; Var H1:Handle; {defining H1 as your Handle} B1:Boolean; {defining B1 as your Boolean} ORot:Real; {definitely ORot as a real value? integer?} Begin H1:=FSActLayer; {setting your Handle to be the first selected object on the layer} ORot:=HAngle(H1); {setting ORot to be the angle of the Handle or the first selected object on the layer} SetRField(H1,'Lighting Device','Rotate3DPosition','True'); {Not sure what the "R" between Set and Field is for, but enabling 3D Orientation on H1} SetRField(H1,'Lighting Device','EnableZRot','True'); {Enabling Z Rotation} SetRField(H1,'Lighting Device','zRot',Concat(ORot)); {setting the Z Rot field to be the ORot value} ResetObject(H1); {updates the object with the new Z Rotation value} End; Run(LDRotation); The only two things that were unclear to me were the "H" in front of Angle and the "R" in SetRField. Thank you again for this script!
  4. @Pat Stanford it works! I've been looking forward to this day for some long! I'd love to learn how to make it work across all Lighting Devices in the file if that is possible. This will save us so much time. Thank you so much!
  5. Thank you so much @Pat Stanford! I will give this a shot right now. Am very interested in learning more about this and will absolutely be coming back to talk more!
  6. I've never done any scripting before, only used scripts that others have created. I would like to know if it is possible to create a script that does the following things to all "Lighting Devices" in a file: - Copy rotation data - Enable "Set 3D Orientation" if it is not already enabled - Enable "Z Rotation" if it is not already enabled - Paste rotation data into "Z Rotation" field If anyone could help me out with this I would truly appreciate it! Thanks!


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.

  • Create New...