Jump to content
Developer Wiki and Function Reference Links ×

GetObject( '__NNA_SL_Pref_Record' ); always yields nil in VW 2022 SP4


Recommended Posts

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?

Link to comment

@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 by MullinRJ
Link to comment

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.

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...