V6 RhinoScript Editor problems


#1

Hi RMA,

I have noticed that scripts (especially longer ones, 1000 lines+) take long to VERY long to run from the editor, compared to running the very same scripts from Editor in V4 or V5. Also, I get errors on “Unterminated string constant” in many scripts that run normally in V5 and V4. Note that if I run these scripts in V6 by dragging into Vport or compiling into rhp all works fine. So it must be some Editor changes. Hope we can make it work again.

Thanks,

–jarek


#2

Any interest in this?
It is a major problem for many of our tools if we were to switch to and test out V6 with ScriptEditor.
Apart for very slow start and reporting syntax errors in code that work fine in V5 version the reported line does not even contain the string the error refers to.

Other than the look (new icons) I was wondering what other changes have been / are being made to the Editor. Something got broken for sure.

–jarek


(Pascal Golay) #3

Hi Jarek - thanks for the nudge, I’ll take a look.

-Pascal


#4

Hi Pascal,

thanks, let me know if you need any sample files - this will not be obvious with shorter scripts. Hope you wrote a few script novels before (try 3000 lines +). The start is slow and while starting all the fans start and I can see a surge in processor use.

–jarek


(Pascal Golay) #5

Hmm 3000 +… @Jarek , a novella is about the best I can scare up so far - if you have a good solid novel you can send me, I guess that would be more sure to show the problem.

Thanks,

-Pascal


#6

I emailed you some good reading material :wink:

-j


(Pascal Golay) #7

Hi Jarek - got it, I see there’s a problem… thanks!

-Pascal


#8

On the topic of V6 RhinoScript Editor problems, in debugging some scripts I’ve noticed that the error report seems to be counting the number of lines of executable code (skipping blank lines and comments). Is this a known issue?


(Brian Gillespie) #9

@dale can you please look into this?
@aswartzell do you have a script that clearly reproduces the problem?


(Dale Fugier) #10

@aswartzell, @brian: I am sure this issue is cased by this fix:

https://mcneel.myjetbrains.com/youtrack/issue/RH-34064

I’ve reverted this change. I’ve also created a new item to fix the above property.

https://mcneel.myjetbrains.com/youtrack/issue/RH-36256

– Dale


#11

Thanks for looking into this @dale. Sorry about the delayed response, @brian, but any script seems to cause the error. For example, running this script results in the error below:

Option Explicit
'Script written by <insert name>
'Script copyrighted by <insert company name>
'Script version Monday, November 14, 2016 1:23:09 PM

Call Main()
Sub Main()

	this Is line 9
	
End Sub


(Brian Gillespie) #12

RH-36256 is fixed in the latest WIP
RH-34064 is fixed in the latest WIP


#13

Hi @Dale, @Pascal,

The ‘slow start’ problem and errors with comments are no more there, thanks for fixing it!
I have noticed another weird behaviors though when running scripts from the editor (and not dragging them or running as plugins)

  1. if you change the command prompt, it does not go back to normal "Command: " after script ends/gets cancel

  2. command autocomplete is active during script runtime. Again, only for scripts ran from Editor. This gets in a way of scripts that read keyboard presses in ‘real time’ - with the new GetKey method and others… Autocomplete should not be active when running scripts.

hope these can get fixed as well. Thanks!

–jarek


(Dale Fugier) #14

Yea, of course. This should be fixed in next week’s WIP…


#15

All works well now. Thanks for the fix - makes it easier to test scripts in V6…


#16

Hi @Dale,

Found another problem in the current WIP editor: Rhino.Command() method commands don’t work in scripts executed from the Editor. Work OK from _Runscript (…) buttons and dragging scripts into Rhino…

–jarek


(Pascal Golay) #17

Hi Jarek - Yep, got that, thanks…
Looks like it is not seeing the final “)”, maybe. If you run

Rhino.Command(“Line”)

from the editor, with no sub or any other code. the error is


Rhinoceros WIP RhinoScript

Source: Microsoft VBScript compilation error
Error: Expected ')'
Line: 1
Char: 20
Code: Rhino.Command(“Line”

OK

-Pascal


(Dale Fugier) #18

This has already been fixed for this week’s WIP release.


(Pascal Golay) #19

Hi Dale - it is not working here this morning - I’ll check for an update…
-Pascal