Jump to content

Vectorscript for Spotlight preferences


MSLD

Recommended Posts

Does anyone know of a listing of the spotlight preferences?

I'm trying to make a basic script, e.g:

Setpref(11,true); to turn on layer colors

I want to be able to turn on and off the 'modify the lighting device color'

but I don't know what preference # it is, and can't find a listing in the VS guide.

Anyone know?

Link to comment
  • Vectorworks, Inc Employee

There is not preference number, the information is contained in a hidden record.

"__NNA_SL_Pref_Record"

You may need to set the following fields:

'ModifyColor' {bool}

'UseDeviceColor' {bool}

'ChangeFill' {bool}

'ChangePen' {bool}

If you change the settings you will either need to reset all the lighting devices or at a minimum call LDevice_ClearCache() depending on which settings are changed.

Link to comment
  • 9 years later...

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

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