Sam Jones Posted July 23, 2022 Share Posted July 23, 2022 In VW 2022, SP4, the following always results in NIL. PROCEDURE FindSLPrefRecs; CONST SLPrefRecName = '__NNA_SL_Pref_Record'; VAR SLPrefRecord :HANDLE; BEGIN SLPrefRecord := GetObject(SLPrefRecName); IF SLPrefRecord = NIL THEN AlrtDialog('SLPrefRecord is NIL') ELSE AlrtDialog('SLPrefRecord is NOT NIL'); END; RUN(FindSLPrefRecs); As a result SLPrefRecName = '__NNA_SL_Pref_Record' SLPrefRecord := GetObject(SLPrefRecName); AutoPositMoveON := GetRField(SLPrefRecord, SLPrefRecName, 'AutoPosition'); fails because of a NIL Handle. How do I get and set the auto positioning preference for Spotlight? Quote Link to comment
MullinRJ Posted July 23, 2022 Share Posted July 23, 2022 (edited) @Sam Jones, The only place I see that record existing is in the "Spotlight (UK Metric).sta" stationary file. The other two stationary files supplied by VWInc, "Spotlight (Metric).sta", and "Spotlight (Imperial).sta", don't have it. You'll have to import it or recreate it. I only searched VW 2022 supplied files. Raymond Edited July 23, 2022 by MullinRJ Quote Link to comment
Sam Jones Posted July 23, 2022 Author Share Posted July 23, 2022 I'll would import it, but import it into what? That record used to control Spotlight auto positioning of units onto hanging positions. It should always be available. Kevin Linzey?? Quote Link to comment
MullinRJ Posted July 24, 2022 Share Posted July 24, 2022 (edited) Well, this was obviously wasted effort... XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX Edited July 24, 2022 by MullinRJ Quote Link to comment
Vectorworks, Inc Employee klinzey Posted July 24, 2022 Vectorworks, Inc Employee Share Posted July 24, 2022 @Sam Jones I'd have to look at the code but the record probably does not exist in a new blank file, you probably have to do something related to the lighting device before the record is created. Quote Link to comment
Sam Jones Posted July 24, 2022 Author Share Posted July 24, 2022 I created a hanging position and placed some Lighting Devices on it, but I still get GetRField( SLPrefRecord, '__NNA_SL_Pref_Record', 'AutoPosition' ) = NIL Quote Link to comment
Sam Jones Posted July 24, 2022 Author Share Posted July 24, 2022 In an older file the record exists and controlling auto positioning works. In new files, no love. Quote Link to comment
Sam Jones Posted July 24, 2022 Author Share Posted July 24, 2022 Apparently, I have to go to Spotlight Preferences... and toggle auto positioning there. Once I do that, script commands controlling auto positioning work. Please, please, please, load and use the record when either a Hanging Position is created or a Lighting Device is placed. 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.