Jump to content
Developer Wiki and Function Reference Links ×

Runscript function disappearing from cell


Recommended Posts

Hello everyone,

 

I am making a script to search in a spreadsheet, the script will need to run from a cell and the RunScript function.

 

I had some problems and I would like to know if anyone has had similar problems: - after recalculating the spreadsheet either by right-clicking or by OIP the cell that contained the RunScript function is emptied, the function was no longer visible and the properties of the cell had changed, did you Have you ever had or seen this kind of behavior?

 

Visible on the attached captures

 

Be careful, the attached file can cause Vector to crash when running the script in the spreadsheet: RunScript in cell A59

 

All remarks will be welcome to understand what can be a problem.

 

Thank you and good day!

00- RunScript in a cell.jpg

01- Fonction RunScript qui disparait.jpg

01- Taille de la police de la cellule qui change.jpg

TW 14_PP 60 Simplifié V2.vso Test Plugin Menuiseries Extérieures 05 Simplifié V5+Script UUID et autres-V8 pour Forum.vwx

Link to comment
  • 3 weeks later...

Hi all,

 

I hope the summer is going well for you!

After a good break I plunged back into the worksheet scripts, I again had inconsistent displays but that I can't reproduce in an orderly way to be able to tell you the different steps to do to have the same result as on the attached screenshots.

 

Have you ever had this kind of display after running a script in a cell with RunScript?

 

(In the next message I will attach a .vwx file with different steps that make the contents of the cell where there was the RunScript formula disappear)

 

Thank you and have a great day,

00- RunScript dans cellule A55 avant exécution du script.jpg

01- Suite exécution RunScript Cellule A55_texte modifié et incohérent.jpg

02- Suite exécution RunScript Cellule A55_texte modifié et incohérent.jpg

Link to comment

Hi,

 

I would like to understand what can create a display bug or who can delete the contents of cell A55 which contains the RunScript('GetWSSubrow....-V2) function.

 

Short summary on the file:

 

In the attached file there are 3 scripts, 2 scripts are executed in a cell with RunScript, the 3rd is executed by double clicking on it in the manager.

On each database row, the Return UUID script returns the ID of the element according to the criteria.

In cell A55 the script will look for identical UUID values to group them.

The ClearWSCellBefore script run from the handler will check if rows are available for writing.

 

By following the scenario below you should have the same thing as me, namely the content of cell A55 which contains runscript will be emptied while we are not acting on this cell:

1- Open the attached file, double click on the table and in cell A55 you should see =RunScript('GetWSSubrowCell...-V2')

2- Return the cursor to cell A60 (the tests were sometimes different by leaving the cursor on cell A55 (?)) and close the worksheet.

3-Run ClearWSCellBefore from the manager.

4-Go back to the worksheet and check the content of cell A55, the cell is empty and the format parameters have changed, there is no font size, some items are unchecked..

 

Does anyone know what can act in this way on a cell? Any ideas or leads?

 

On 30-40 tests of this scenario I also had a blue fill appearing with huge line thickness in the cell like in the attached capture.

With the scenario above and the attached file I did not have a crash.

 

Thanks and have a good day!

 

04-Remplissage et épaisseur de trait qui apparait.jpg

Test Plugin Menuiseries Extérieures 05 Simplifié V5+Script UUID et autres-V8 pour Forum - test erreur Runscript.vwx

Link to comment

Hello Pat,

 

Thank you very much for testing!

I tested on the post of a colleague and I had the same result, the contents of the cell are emptied.

Below is a video where you will see what is happening.

I can't figure out what's going on, I manage to reproduce it on my workstation since I don't save this file to keep the error, but the other times it happened it looked like random.

Since this worksheet and this script will have to be used by several people, I will not leave the script in a cell but we will have to run it from the manager.

 

By executing it from the manager I did not have any error of this type so we will keep this option, but I would have liked to understand where this behavior comes from on the cell.

Thank you for your test and if no one has ever had this kind of behavior we will opt for a double click on the script in the manager to avoid errors of this type.

 

we have this version in france 2023 SP5.1_IC_F4_(Build 702742)

 

Have a great day

 

Link to comment
  • 2 weeks later...

Hi,

 

I got feedback from the hotline who managed to reproduce the problem without really knowing why it failed.

For them it looks like a bug which could perhaps come from the numerous alert messages which interrupt during the execution of the script.

There could also be a problem when multiple WS scripts run while one is still running.

 

They'll pass it on to the developers at Vectorworks Inc. and I'll let you know if I get a response.

 

Have a great day !

Link to comment
  • 2 weeks later...

Hi,

 

I received feedback from one of the developers at Vectorworks Inc. I am sending you an extract that may be of interest to some user :

 

" The scripts as cell formulas should only calculate the value of this cell. If it is more complicated script that works on the entire worksheet should be a separate script in prinzip. "

 

I solved the problems visible above by removing the script that was executed with the Runscript function and I compiled everything into a script that is executed by double clicking on it.

The original goal was to put the script in a cell so that it would run whenever the user updates the spreadsheet, but this apparently isn't appropriate.

 

 

Good day to all!

Link to comment

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.

×
×
  • Create New...