Silas Posted May 22, 2018 Share Posted May 22, 2018 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 Quote Link to comment
JBenghiat Posted May 22, 2018 Share Posted May 22, 2018 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+"')") 1 Quote Link to comment
Silas Posted May 22, 2018 Author Share Posted May 22, 2018 It works finally thanks a lot! best regards Quote Link to comment
Recommended Posts
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.