Matt Zelkowitz Posted May 31, 2007 Share Posted May 31, 2007 Hello all, Can anyone please point me in the direction of a command to set the record value of a PIO? Specifically, in Spotlight: each Light (Device) has a checkbox for the "Draw Beam" option in the object info palette. Unfortunately, this check box is waaaay down in a long list of fields/records. So it it time consuming to toggle its state. If I could write a script to change the "Draw Beam" record value to false or true, then I could make a tool which could be accessed via a simple right-click or other shortcut. I am using VW12.5.0 on a MacIntel Powerbook. Thanks, Matt Zelkowitz Available Light Quote Link to comment
Dieter @ DWorks Posted May 31, 2007 Share Posted May 31, 2007 you first need to go through the list of these pio's: ForEachObject(); Then when you have retrieved the handle to the object: SetRField(obj_handle,'Name of Pio','Draw Beam',false or true); You can also look in the online reference instead of the built in one, there are some tips with each command etc. http://www.nemetschek.net/support/custom/vscript/reference/default.asp Quote Link to comment
Miguel Barrera Posted June 7, 2007 Share Posted June 7, 2007 Matt, What you are trying to do can be achieved without any programming. By changing the order of the pio parameters, you can set the parameter at the top so that it may be viewed on the object info palette. Otherwise, if you still want to script it, the following will toggle the value of selected pio's. PROCEDURE TogglePar; PROCEDURE ProcessObj(ObjHdl: HANDLE); VAR curState: STRING; BEGIN curState:= GetRField(ObjHdl,'Pio name','Draw Beam'); UprString(curState); IF curState = 'TRUE' THEN SetRField(ObjHdl,'Pio name','Draw Beam','False') ELSE SetRField(ObjHdl,'Pio name','Draw Beam','True'); END; BEGIN ForEachObject(ProcessObj,((SEL=TRUE))); END; Run(TogglePar); The only thing you need to do is substitute 'Pio name' for the actual name of your pio. Quote Link to comment
Dieter @ DWorks Posted June 7, 2007 Share Posted June 7, 2007 You can't change the parameters of a pio! only if you made it yourself! Quote Link to comment
Miguel Barrera Posted June 16, 2007 Share Posted June 16, 2007 Someonenamedlink, Sorry to disagree because I am using VW 11 and I can change the parameters of any pio at will. I cannot change the script because it is locked. Maybe this has changed in VW 12 or the european version has this additional restriction. Quote Link to comment
Dieter @ DWorks Posted June 16, 2007 Share Posted June 16, 2007 i just checked and now i see. that's very handy! thx 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.