SebastienB Posted May 16, 2017 Share Posted May 16, 2017 Hello Everybody, I have a problem since installation of VectorWorks 2017. I created a plugin object with text parameters. When I typed, for example, "Line 1\r Line 2" in a text field in Object Info, the result was: Line 1 Line 2 It was perfect. Since I have installed the release 2017, the result is: Line 1\r Line 2 --> the \r don't works anymore How can I do? Thanks Quote Link to comment
Patrick Winkler Posted May 16, 2017 Share Posted May 16, 2017 (edited) Hi Sebastien, I guess VW 17 does not respect escape sequences because it can have bad side effects. If you provide a win path for example folder\ronald >> folder onald You can print the raw string with the command: s = StringFromTheField print (repr (s)) If the result contains '\\r' instead of '\r' the escape sequence was disabled. Just replace it with '\r' to make it work again. s = 'A\\rB' s = s.replace ('\\r', '\r') regards Edited May 16, 2017 by Patrick Winkler Quote Link to comment
SebastienB Posted May 16, 2017 Author Share Posted May 16, 2017 Yess, it was that, my problem is solved, thanks Quote Link to comment
JBenghiat Posted May 16, 2017 Share Posted May 16, 2017 Prior, Vectorworks wasn't sending escaped strings to the scripting engine. While this was nice for line breaks, having a text field with, say, an apostrophe could break a script. -Josh 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.