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

Notification

Icon
Error

Login


8 Pages123>»
Options
Go to last post Go to first unread
Offline uni  
#1 Posted : 10 November 2013 06:10:55(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)
include

SMath Studio compatibility SMath Viewer compatibility mono compatibility Extension page Sources


Functions: include(1).

You can include sm-file containing a simple set of definitions.

How to use: include("myfile.sm" )=

Note. The dependencies of the include file may differ from the current set of plugins or have different versions. In this case, you need to check that the included file is calculated correctly.

Edited by user 08 January 2022 00:21:37(UTC)  | Reason: Not specified

uni attached the following image(s):
2014-11-01 12-29-40 SMath Studio Desktop.png
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 5 users thanked uni for this useful post.
on 10/11/2013(UTC),  on 10/11/2013(UTC),  on 10/11/2013(UTC),  on 11/11/2013(UTC),  on 11/11/2013(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 10 November 2013 10:40:45(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you uni Good

I was just playing bit with include(). I just figured out that the hoovering over the include there will be presented the alphabetical order of variables, the variables with dot in its name will be ignored. As I could understand only the assignment of variables will work - but not always (complicated structures will be ignored). Now, there is a bit of problem to kepp the track about which variables have been defined with include(). Maybe a list of them to be available?

Regards,
Radovan

EDIT: Hmm...uni posted this a minute before I posted this one. I will check function definitions - it did not work for me.
EDIT1: It is working regarding functions, but the dot in the names is still ignored. Variables are not now in the alphabetical order

Edited by user 10 November 2013 10:54:10(UTC)  | Reason: Not specified

omorr attached the following image(s):
include2.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline uni  
#3 Posted : 10 November 2013 10:48:48(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)
I'll fix this later.

P.S. I'll remove preprocessing too.

Edited by user 10 November 2013 11:19:53(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 10/11/2013(UTC)
Offline uni  
#4 Posted : 10 November 2013 11:12:38(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)
Updated. Try now.
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 10/11/2013(UTC)
Offline omorr  
#5 Posted : 10 November 2013 12:33:38(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

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

Yes, it seems ok now. Dot is working inside a variable name.
Thank you.

Regards,
Radovan

EDIT: Suppose that units are not handled yet
EDIT1: Yes, units are handled now Good .

Edited by user 10 November 2013 19:43:01(UTC)  | Reason: Not specified

omorr attached the following image(s):
include-units.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline uni  
#6 Posted : 10 November 2013 17:01:31(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)
Updated. Try now.
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 10/11/2013(UTC)
Offline mkraska  
#7 Posted : 10 November 2013 18:40:46(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
uni, Davide,

Could the include() function possibly be combined with the hyperlink region, such that the link points to the sm file to be included (opens in a new window)? One could think of a special region with the option to choose the link target...

Of course, this would just be nice to have, not worth distracting you from more important stuff.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline uni  
#8 Posted : 10 November 2013 18:57: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)
I think David can do it, combining both our source code. Something like the Reference in Mathcad.
Russia ☭ forever
Viacheslav N. Mezentsev
Offline omorr  
#9 Posted : 10 November 2013 19:46:24(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

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

Thank you. It seems I am just just few moments ahead before you fix all these things.
I will just wait and stop bothering you about it for a while Good

Regards,
Radovan


When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#10 Posted : 10 November 2013 20:56:00(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Nice work Viacheslav OK

Originally Posted by: mkraska Go to Quoted Post
uni, Davide,

Could the include() function possibly be combined with the hyperlink region, such that the link points to the sm file to be included (opens in a new window)? One could think of a special region with the option to choose the link target...

Of course, this would just be nice to have, not worth distracting you from more important stuff.


Originally Posted by: uni Go to Quoted Post
I think David can do it, combining both our source code. Something like the Reference in Mathcad.


I think that a new region derived from our codes should be the way; as additional thing the "maple" region could give an additional contribute (region without input placeholder) Good


BTW actually I'm exploring an unexplored corner of SMATH's API Spiteful

Edited by user 10 November 2013 21:14:58(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Andrey Ivashov  
#11 Posted : 11 November 2013 01:01:17(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
BTW actually I'm exploring an unexplored corner of SMATH's API Spiteful

I'm thrilled! Yes

P.S.: Uni, bravo!
thanks 1 user thanked Andrey Ivashov for this useful post.
on 11/11/2013(UTC)
Offline Davide Carpi  
#12 Posted : 11 November 2013 01:49:23(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Whistle
Davide Carpi attached the following image(s):
tern.gif
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 2 users thanked Davide Carpi for this useful post.
on 11/11/2013(UTC),  on 13/11/2013(UTC)
Offline mkraska  
#13 Posted : 11 November 2013 04:25:49(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Davide, that is simply great! Does that mean that you can define arbitrary operator formats?

Then here is my wish-list
- cases (like sys, just with 2 columns, first value, second condition)
- at (vertical bar with subscript for the location)
- vec (boldfacing and non-scalar-declaration)

Can you make symbolic and numeric evaluation look differently?

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Davide Carpi  
#14 Posted : 11 November 2013 14:17:56(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: mkraska Go to Quoted Post
Davide, that is simply great! Does that mean that you can define arbitrary operator formats?

Then here is my wish-list
- cases (like sys, just with 2 columns, first value, second condition)
- at (vertical bar with subscript for the location)
- vec (boldfacing and non-scalar-declaration)

Can you make symbolic and numeric evaluation look differently?

Andrey's magic interfaces Good

As for now the first is in my plans and is possible to do; the 2nd and the 3rd are interesting but (as first impression) are closest to low-level operators than to functions, so I'm not sure that is possible to have something usable... Are just thoughts, maybe is possible, as usual step-by-step we will discover what we can do... Good

Edited by user 11 November 2013 16:44:20(UTC)  | Reason: Not specified

Davide Carpi attached the following image(s):
2013-11-11 15_29_12-SMath Studio Desktop - [SF.sm].png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline sublim21  
#15 Posted : 26 November 2013 21:22:55(UTC)
sublim21


Rank: Advanced Member

Groups: Registered
Joined: 18/05/2011(UTC)
Posts: 36

Was thanked: 3 time(s) in 3 post(s)
Awesome! i was waiting for something like this to come along. Much appreciated!

the only problem is, i went to your svn link, and... i was confused on what to download/what to do, to add your 'include' extension into my portable version of smath. Can someone please explain what I'm supposed to do to have access to this incredibly nice extension?

Thanks,

-Pete

*edit - i found this link of plugins and extensions with the include plugin listed.
http://smath.info/?extensions=SMathStudio_Desktop

is this the latest version? cause everytime i try to run it, i get an error - Object Reference not set an instance of an object.

I inserted the dll file located above in the plugin folder of my portable smath folder. still getting the same error

Edited by user 26 November 2013 23:15:40(UTC)  | Reason: Not specified

Offline mkraska  
#16 Posted : 26 November 2013 23:50:32(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: sublim21 Go to Quoted Post
Awesome! i was waiting for something like this to come along. Much appreciated!

the only problem is, i went to your svn link, and... i was confused on what to download/what to do, to add your 'include' extension into my portable version of smath. Can someone please explain what I'm supposed to do to have access to this incredibly nice extension?

Thanks,

-Pete

*edit - i found this link of plugins and extensions with the include plugin listed.
http://smath.info/?extensions=SMathStudio_Desktop

is this the latest version? cause everytime i try to run it, i get an error - Object Reference not set an instance of an object.

I inserted the dll file located above in the plugin folder of my portable smath folder. still getting the same error


You can use the inofficial portable distribution, the plugin is included there, see link in my signature.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline sublim21  
#17 Posted : 27 November 2013 21:34:09(UTC)
sublim21


Rank: Advanced Member

Groups: Registered
Joined: 18/05/2011(UTC)
Posts: 36

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


You can use the inofficial portable distribution, the plugin is included there, see link in my signature.


Thanks for providing that portable version Mkraska.

Unfortunately, i'm still getting the same error. I just tested your portable on two seperate windows 7 installations, with the following.

a test.sm file was created and saved in the portable directory with only the following declaration:

testy:5

Then, i tried 'including' this test.sm in another smath page with

include( "test.sm" ) =
(spaces are included in the above to avoid the emoticons!)
and i'm still getting the object reference error.

I tried moving the test.sm file to another location "I:\test.sm" and still was getting the same errors on both machines.

Any ideas?

-Pete

Edited by user 27 November 2013 21:43:13(UTC)  | Reason: Not specified

Offline mkraska  
#18 Posted : 28 November 2013 01:10:26(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
I get the object reference error message if the specified file name to include is wrong. File names without path are relative to the directory of the given document. Thus, make sure both docs are in the same directory if there is no path specified.
Otherwise you have to specify the full absolute path or a path relative to your current document's directory.

PS: uni, would be nice if there was a more specific error message like "file not found" including info on where the file is expected to be (path)

Edited by user 28 November 2013 01:13:32(UTC)  | Reason: Not specified

File Attachment(s):
SMath and the OS.sm (26kb) downloaded 84 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline uni  
#19 Posted : 28 November 2013 18:29:33(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)
Show me log.txt from the plugin directory.

Quote:
PS: uni, would be nice if there was a more specific error message like "file not found" including info on where the file is expected to be (path)


This message should be displayed if the file is not found (from source code where FileName - full path):

Code:
if ( !File.Exists( FileName ) ) throw new Exception( "File not found: " + FileName );

Unfortunately, I do not understand where it disappears.

Object reference error - this is normal situation, but these errors must be hidden. You can see them in log.txt. The latest version for now is 1.0.5062.35981.

Edited by user 28 November 2013 19:00:35(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
Offline mkraska  
#20 Posted : 28 November 2013 20:12:08(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
This is the log contents, if I open caller.sm with a valid include statement and then mess up the file name a little in order to test what happens if I try to include a non-existing file.

Quote:
28.11.2013 18:05:11 [INFO ] [Plugin.Initialize()] include(1) - include sm-file.
28.11.2013 18:05:11 [INFO ] [Plugin.Initialize()] Successfully. 1 functions loaded.
28.11.2013 18:05:56 [ERROR] Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
28.11.2013 18:06:01 [ERROR] [Plugin.ExpressionEvaluation()] include(1) File not found: D:\FHB\Software\SMath\SMath Skript\SMath\Include\efs.sm
28.11.2013 18:06:01 [ERROR] [Plugin.ExpressionEvaluation()] include(1) File not found: D:\FHB\Software\SMath\SMath Skript\SMath\Include\efs.sm

File Attachment(s):
caller.sm (2kb) downloaded 98 time(s).
defs.sm (3kb) downloaded 88 time(s).
mkraska attached the following image(s):
include.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
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 Pages123>»
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.