Different behavior running script from BasicMaker vs PlanMaker

Post your questions, bug reports and suggestions here for PlanMaker 2016 for Windows.

Moderator: SoftMaker Team

Post Reply
americanaustralian
Posts: 9
Joined: Sat Jul 13, 2013 7:50 pm
Location: Manteca, CA USA

Different behavior running script from BasicMaker vs PlanMaker

Post by americanaustralian » Thu Dec 01, 2016 4:16 am

When I run the following script, I get a significantly different result depending on where I run it from. Save the script in BasicMaker. Open a PlanMaker sheet and run the script via Tools=>Start Script. Note how fast the numbers get filled in. Open the script in BasicMaker, then press F9. The numbers get filled in, but not with the same behavior. Why the difference?

Dim pm as Object
Set pm = CreateObject("PlanMaker.Application")
pm.Application.Visible = True

Dim row, col, coun, x, pp, dd as Integer

pp = 1000
dd = 35
col = 1
For row = 1 to dd
pm.Cells.Item(row, col).Value = ""
Next row


For row = 1 to dd
coun = coun + 1
pm.Cells.Item(row, col).Value = coun
For x = 1 to pp
Next x
Next row

col = 3
coun = 0
For row = 1 to dd
pm.Cells.Item(row, col).Value = ""
Next row


For row = 1 to dd
coun = coun + 1
pm.Cells.Item(row, col).Value = coun
For x = 1 to pp
Next x
Next row

Set pm = Nothing

sven-l
SoftMaker Team
SoftMaker Team
Posts: 7893
Joined: Wed Apr 09, 2008 8:26 am
Location: Nuremberg
Contact:

Re: Different behavior running script from BasicMaker vs PlanMaker

Post by sven-l » Tue Dec 06, 2016 10:39 am

I will refer your questions to our developers and answer here as soon as I have more information.
Sven Leßmann
SoftMaker Software GmbH

sven-l
SoftMaker Team
SoftMaker Team
Posts: 7893
Joined: Wed Apr 09, 2008 8:26 am
Location: Nuremberg
Contact:

Re: Different behavior running script from BasicMaker vs PlanMaker

Post by sven-l » Fri Dec 09, 2016 11:28 am

In PlanMaker the script runs within PlanMaker, whereas in BasicMaker it is executed line-by-line, making sure that the connection still exists after every command that is sent to PlanMaker - it is used to edit and debug the script.
Sven Leßmann
SoftMaker Software GmbH

Post Reply

Return to “PlanMaker 2016 for Windows”