Jump to content
Sign in to follow this  
Ben Wingrove

Error Invalid number of parameters? (Python)

Recommended Posts

I hope someone can help me, I have been playing round with creating scripts.

On some of my saved views I want to run a fit to window script as I have different sized monitors.

I created a simple script using python

vs.DoMenuTextByName('Fit To Window')

when i choose the saved view the script works as it should but I get the following error

Error: Invalid number of parameters to the callback function. : index = 1 name=index

File "", line 1, in

File "", line 1, in

I have been trying to find a solution to this for most of the day now and it is driving me crazy, any help will be greatly appreciated

Thanks

Ben

Share this post


Link to post

I believe you are missing the index number:

def vs.DoMenuTextByName(subMenu, index):

return None

Try vs.DoMenuTextByName('Fit To Window',0)

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