Jump to content
Silas

Criteria Search with Variable

Recommended Posts

Hello,

 

First sorry for my bad english I'm from Switzerland  :) 

I tryed to creat a multible SelectObj Script for our Spacetool.

Now I have no ideas left why my script doesnt work - i get always the error output, for my variable when i have more than one word in my input dialog.

The strange thing is, when i write my input direct in the string it works fine.

Simple Script that work:

 

criteria = ("('Space'.'Floor Finish'='Platten weiss')")

vs.SelectObj(criteria)

 

My idea for the script:

eingabe = vs.StrDialog('Material eingeben','')

vs.AlrtDialog('Folgendes wird nun ausgewählt '+ eingabe)

criteria = ("('Space'.'Floor Finish'="+eingabe+")")

vs.SelectObj(criteria)

 

In my PY Charm the script works allready... (is that a vectorworks based bug or problem?)

 

Thank you 

 

 

 

Share this post


Link to post

You’ll need to add single quotes to the string, especially if the search term is more than one word. 

 

criteria = ("('Space'.'Floor Finish'='"+eingabe+"')")

  • Like 1

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.


 

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