Jump to content
SebastienB

Trouble multi-line field in a plugin obect since VW2017

Recommended Posts

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

Share this post


Link to post

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 by Patrick Winkler

Share this post


Link to post

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

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