Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


8 Pages«<5678>
Options
Go to last post Go to first unread
Offline MarB  
#121 Posted : 24 February 2019 11:19:39(UTC)
MarB


Rank: Advanced Member

Groups: Registered
Joined: 21/10/2016(UTC)
Posts: 84

Was thanked: 21 time(s) in 17 post(s)
Originally Posted by: uni Go to Quoted Post
Updated. Try now.


It works. Thanks a lot.
Offline alyles  
#122 Posted : 19 March 2019 22:25:04(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 275
United States

Was thanked: 91 time(s) in 57 post(s)
Originally Posted by: uni Go to Quoted Post

Updated (plugin version changed to 0.2.x.x). Try now.

Old worksheets must be saved in the new format.


Hi is there anyway to throw an error if the worksheet needs to be saved?
It presently evaluates to 0 without any indication of error.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline uni  
#123 Posted : 20 March 2019 00:53:27(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Most of my plugins have a log file in the folder where the plugin is located. Yes, I could classify the errors and stop the function when the first error occurred. In the meantime, I quietly write them to a file. The parse function tries to recognize all constructions as much as possible, but this cannot be done completely in the way that I use. In order not to return an error, I return the number of recognized definitions.
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 20/03/2019(UTC)
Offline Jean Giraud  
#124 Posted : 20 March 2019 02:33:25(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: alyles Go to Quoted Post
Hi is there anyway to throw an error if the worksheet needs to be saved?
It presently evaluates to 0 without any indication of error.

The wrong may be right ... isn't it ?
Red does not necessarily means error.
It may mean "Equation too long to display"
For sure: if a result is wrong, wrong until doctored.
Cheers alyles ... Jean.

Oh ! you forgot the work sheet !
Offline sinneD  
#125 Posted : 20 March 2019 06:08:38(UTC)
sinneD


Rank: Advanced Member

Groups: Registered
Joined: 12/03/2011(UTC)
Posts: 101
Location: Chicago

Was thanked: 16 time(s) in 7 post(s)
Uni-

I have been chasing this error for a little while now.

Alyles and Davide helped me on Discourse, ( https://en.smath.com/for...urse-channel-anyone.aspx )

and we figured out that the issue was that the file that was to be included needed to be touched, or opened and saved to update it, and then save it.

The log however, leads one to believe that function loaded correctly and included the file. See screen below.

The other difficulty I had was finding the log- the extensions folder names are obfuscated.

Click to enlarge

Edited by moderator 10 December 2021 15:48:50(UTC)  | Reason: Not specified

Join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline uni  
#126 Posted : 14 August 2019 09:27:01(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Originally Posted by: sinneD Go to Quoted Post
and we figured out that the issue was that the file that was to be included needed to be touched, or opened and saved to update it, and then save it.


1. Included sm-file must exsists.
2. You need save document with include() function (for relative path). This is because of value of current directory. Only when you save worksheet the current directory and the path to sm file become defined. For now as I know there is no way to address this. SMath Studio change the current folder only when you save the document.

Perhaps the error is due to the fact that the parsing of the document failed, but an error message is not provided for this case.

Originally Posted by: sinneD Go to Quoted Post
The other difficulty I had was finding the log- the extensions folder names are obfuscated.


As for that for now I don't know how get access more simply.

Edited by user 14 August 2019 09:47:16(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
Offline Razonar  
#127 Posted : 18 November 2020 10:11:05(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. First, thanks for your work. I think that include it's one of most important tools in SMath for write advanced functions, like ode solvers, in native SMath code, instead of use C# plugins.

It's possible using include in a function body? Please, see the attached. In case that it could be, can also be values in include only local for the caller function, and not to the entire worksheet?

ref_f.sm (3kb) downloaded 17 time(s).
work_with_ref_f.sm (20kb) downloaded 18 time(s).
work_with_ref_f.pdf (103kb) downloaded 15 time(s).

Thanks!!!
Best regards.
Alvaro.
Offline PompelmoTell  
#128 Posted : 18 November 2020 12:09:21(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 318
Man
Italy
Location: italy

Was thanked: 109 time(s) in 93 post(s)
using "include" as a function parameter can work around the problem!?

SMathStudio_Desktop_aUJl1swnf3.png

sergio
thanks 1 user thanked PompelmoTell for this useful post.
on 18/11/2020(UTC)
Offline Razonar  
#129 Posted : 18 November 2020 19:35:22(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: PompelmoTell Go to Quoted Post
using "include" as a function parameter can work around the problem!?

sergio


Hi Pompelmo. Absolutely. That' exact what I want. Thanks very much.

Best regards.
Alvaro.
Offline uni  
#130 Posted : 18 November 2020 20:15:41(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
It's funny, but be patient and no workaround is needed. Andrey will help us with a possible bug.
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 18/11/2020(UTC)
Offline Jean Giraud  
#131 Posted : 18 November 2020 21:35:54(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: uni Go to Quoted Post
It's funny, but be patient and no workaround is needed. Andrey will help us with a possible bug.

I understand the idea of introducing include in some kind of collection, something similar writefile, readfile. But, include is a one time use. In the attached, if I copy/paste include in a new sheet file not found ... same if recall from the f(x) menu and code.
The idea was to use the algos include for other data fitting session.
OK, in that single use include, no problem to add more fitting sessions.
In the attached, we have 3 fitting sessions all happy from single include.
What is the use of include ? To me, just a competitive curiosity to Mathcad.
Collapsed area does the same thing, infinitely transportable.

Cheers ... Jean

GenfitAlgoInclude.sm (37kb) downloaded 13 time(s).
Genfit Algo Include Test UpDated.sm (89kb) downloaded 13 time(s).
Offline uni  
#132 Posted : 19 November 2020 20:52:07(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Someday, Jean, sm-document will become a project, in other words we will have a complete book. I hope so.
There is still a lack of standardization in the documents. Everyone invents their own wheel. This is extra work.

Libraries need to be made from standard calculations. Now there are two versions of "libraries": plugins and files connected using an include() function.
Collections from such libraries have all the serious design tools.
Russia ☭ forever
Viacheslav N. Mezentsev
Offline FloR96  
#133 Posted : 18 November 2021 10:12:24(UTC)
FloR96

Rank: Newbie

Groups: Registered
Joined: 18/11/2021(UTC)
Posts: 1
Austria

Hello,

I have a question if it is possible to use the include plugin and include only some "public" variables from a include.sm to an other file and not all variables which exists in the included file?

Thaks,
Florian
Offline uni  
#134 Posted : 18 November 2021 11:58:57(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
In theory, I could add some sort of options to filter the contents of the files, but usually the definitions are interconnected. If this is not the case, then they can be saved in a separate file and included in other files. It is possible to add options to search for matches by operand name, function name, or area name, but this is unlikely to be useful.
Russia ☭ forever
Viacheslav N. Mezentsev
Offline RFreund  
#135 Posted : 20 November 2021 00:26:49(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
A couple things about include()

Is it possible to include variables assigned by the combobox region yet? (see here: https://en.smath.com/for...and-Combobox-Region.aspx)

A strange behavior also exists that is related to combox results. Try this:
Create a 'parent file'.
Add a combobox list in the parent file. Let's say it is a "yes/No" matrix and you choose "yes". So "yes" is assigned to the variable YN.
Now create a child file and include the parent file.
It will say that YN is not defined.
Let's go back to the parent file and manually assign YN:"Yes".
Now YN="Yes" in the child file.
Go back to the parent file and delete the manual definition of YN, but keep the combobox list.
Now open the child file and find that YN=yes is still defined. Even if you change the combobox list to "No".
Offline uni  
#136 Posted : 20 November 2021 01:50:37(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Any visual region is skipped as the reading algorithm cannot simulate its operation. Only the core of the program can do this. The external (user) API does not have the ability to recreate components, since it is a complex operation. Only simple definitions can be read and reconstructed.
Or you can ask Andrey to include this feature in the set of standard functions. In this case, he could use the already existing loading code to implement the desired functionality. He knows much more about it.

PS. Okay, as an exception, I could add parsing of this component using its sources. Maybe something will work.

Edited by user 20 November 2021 02:00:55(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 20/11/2021(UTC)
Offline chito  
#137 Posted : 10 December 2021 12:03:37(UTC)
chito

Rank: Newbie

Groups: Registered
Joined: 10/12/2021(UTC)
Posts: 6
Philippines

Was thanked: 1 time(s) in 1 post(s)
Hi. Thanks for this plugin. I found it very useful in creating a single custom functions file for my team.

I'm encountering errors when I have strings with spaces or any other special characters as arguments. If I call the function within the included file there's no error. Does anyone have an idea on what's causing this?

smath-include-error.png

Thanks.

test_sheet.sm (6kb) downloaded 7 time(s).
test_include.sm (6kb) downloaded 8 time(s).
Offline uni  
#138 Posted : 10 December 2021 12:22:01(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
SMath Studio compatibility

Plugin updated. Please try.

Changes:

- added encoding of special characters in the text.
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 10/12/2021(UTC)
Offline chito  
#139 Posted : 10 December 2021 12:37:16(UTC)
chito

Rank: Newbie

Groups: Registered
Joined: 10/12/2021(UTC)
Posts: 6
Philippines

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: uni Go to Quoted Post

Plugin updated. Please try.


The update solves the problem. Thank you very much uni.

Offline uni  
#140 Posted : 05 January 2022 01:46:14(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
SMath Studio compatibility

Originally Posted by: uni Go to Quoted Post
Any visual region is skipped as the reading algorithm cannot simulate its operation. Only the core of the program can do this. The external (user) API does not have the ability to recreate components, since it is a complex operation. Only simple definitions can be read and reconstructed.

As it turned out, there is something that can be done.

Originally Posted by: uni Go to Quoted Post
PS. Okay, as an exception, I could add parsing of this component using its sources. Maybe something will work.

Plugin updated ( Beta ). Please try.

Changes:

- added support for: combobox, combobox list, checkbox list, radio button list, slider;
- the algorithm of work has been changed;
- refactored.

Edited by user 05 January 2022 02:21:28(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
thanks 4 users thanked uni for this useful post.
on 05/01/2022(UTC),  on 05/01/2022(UTC),  on 05/01/2022(UTC),  on 05/01/2022(UTC)
Users browsing this topic
Similar Topics
Display formula stored in "Included" SMath file (Questions)
by faruk 10/03/2024 23:36:28(UTC)
include files @ startup (Questions)
by charlamb 10/05/2023 23:44:05(UTC)
Adidas include guaranteed with the 12 months (Bugs & Problems)
by guanyansb 11/12/2020 07:02:55(UTC)
include function issues (Questions)
by jrufener 01/06/2019 21:44:47(UTC)
[include plugin] missing LinqBridge.dll error in SMath Viewer executables (Bugs & Problems)
by resist 24/11/2017 18:07:37(UTC)
Include [User Program Function] (Feature Requests)
by Jean Giraud 16/04/2016 15:29:14(UTC)
"include" plugin: default directory setting (Feature Requests)
by mikekaganski 04/04/2016 07:19:58(UTC)
Include and Combobox Region (Questions)
by RFreund 01/03/2016 02:18:21(UTC)
include does not seem to work anymore (Bugs & Problems)
by Tinu 23/06/2014 09:56:03(UTC)
Even so Kobe Shoes includes by no means offered " up " their particular method to Nike Air condition (Questions)
by gladys 07/06/2014 05:27:07(UTC)
Include Hook Sections (Feature Requests)
by sublim21 29/05/2013 21:23:33(UTC)
Include ksi and ksf in next release (Feature Requests)
by TheWizEd 17/07/2010 22:42:11(UTC)
Include function (Feature Requests)
by LordMike 24/10/2009 05:15:45(UTC)
8 Pages«<5678>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.