Jump to content
Sign in to follow this  
michaelk

3 Script Palette Questions

Recommended Posts

I need help with 3 questions related to the command

OpenScriptResPal(paletteName :STRING;open :BOOLEAN) ;

and

vs.OpenScriptResPal(paletteName, open)

1. Is there a way to set the screen position and size of the script palettes? I can't find a way to get the dialogID (if there is one).

2. What is the Python command to close a script palette? (It's not 'close', 'closed', 'NOT open', or 'FALSE' !)

3. I don't see a way to GET the open/close status of a script palette. What am I missing?

Thanks!

mk

Share this post


Link to post

Trial and error answers question 2!

vs.OpenScriptResPal(paletteName,'') closes a script palette.

New question 2: Why?

mk

Share this post


Link to post

I believe it may have to do with how Booleans are represented as bits. A Boolean is only one bit that has a value of 0 (false) or 1 (true). Since the length of the string evaluates to 0, it translates to false.

I know that in lower level languages such as "C", you can use expressions or even functions that evaluate to numerical values in Boolean expressions. A zero is false and anything else is true.

Share this post


Link to post

Thanks, Miguel.

I wish there was a VW specific Python language guide. And/Or an additional metric ton of example scripts.

Any ideas about setting the screen position of script palettes?

mk

Share this post


Link to post
I wish there was a VW specific Python language guide. And/Or an additional metric ton of example scripts.

There will be, Michael, when "we" (meaning "you") finish writing them. ;-) Keep up the good work.

Raymond

Share this post


Link to post

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.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...