Jump to content
Developer Wiki and Function Reference Links ×

Setting a LongInt Pref


Assembly

Recommended Posts

'AlrtDialog(Concat(GetObjectVariableLongInt(FLayer,592)));

SetObjectVariableLongInt(flayer,592,956);

AlrtDialog(Concat(GetObjectVariableLongInt(FLayer,592)));'

I'm trying to set the HDRI of the file.

I'm getting an error output stating.

'Warning: no name FLAYER - Error:'

What I'd like to be able to do is script the settings for the HDRI and the Indirect Lighting Settings. Can anyone help please.

Link to comment

The script runs fine on VW2012 on a Mac, but it does not return usable results.

I hope you don't really have the quotes around the script that would make it a string instead of a script.

The GetObjectVariableLongInt(FLayer,592); reuturns zero for me regardless of what I pass into the Set.

I don't have any other experience or ideas.

Link to comment

Thanks Pat.

Correct- No quotes in script.

The setting is the

Menu Lighting -> Setlighting Options.

Dialog Section: Environment Lighting.

The: Selected Back Ground Pop Up.

When I Set the value to 'HDRI White'

The AlrtDialog Tells me it is set on 958

When I Set it to : 'HDRI Spot Light Dome'

The AlrtDialog Tells me it is set on 868

Thus I am getting the value back of the setting...

Now when I try do the reverse using: SetObjectVariableLongInt(flayer,592,956);

I get an error.

The Seconde AlrtDialog is to tell me if I managed to change the setting.

Can you try change your setting as I have above and get the same result?.

Note i found the error listed in the output error dialog by observing the write time of the file. So maybe check also if you get a similar error.

It seems to me, the following related procedure should work.

GetObjectVariableLongInt(FLayer,592);

SetObjectVariableLongInt(flayer,592,956);

Link to comment

The appendix says:

HDRI Layer 592 LONGINT GetObjectVariableLongint

On the assumption that this isn't a typo, the "GetObjectVariableLongint" means that this is a read only one, otherwise it would have said "ObjectVariableLongint".

Not sure about it (i don't know much about textures and lights and so), but maybe one of these two functions can do the trick?

SetLayerAmbientColor

SetLayerAmbientInfo

Link to comment

Thanks Maarten...

When I do a search on the Apendix page I can't find any ObjectVariableLongint.

They all are GetObjectVariableLongint

Does this mean that VS can not Set any of these?.

As an Aside this is the first time I've seen the 'Warning: no name FLAYER' - Error anyone else know this one.

Link to comment

I don't get it ether.

The script does execute.

This error is written to file

/VectorworkSettings/2011/Error Output

The only way I found this error was I had the file open in BBEDIT and noticed the error Output being updated when the script ran.

---

For what it is worth- The content of this Dialog is what I'd like to be able to set with a script. (Note these give quite a good exterior render)

2290091_orig.png

Edited by Assembly
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...