SMath Studio Forum
»
SMath Studio
»
Questions
»
How to share user defined functions or plugins without programming?
Rank: Newbie
Groups: Registered
Joined: 19/12/2016(UTC) Posts: 3
|
Hello, As far as I know, Smath allow us to create user defined functions and to share them using the "plugins". Plugins can be created by programming the functions using a development tool. But this solution is not practical enough when the functions are really complicated. (cf http://smath.info/wiki/G...plugin%20for%20Smath.pdf) I would like to know how would it be possible to share some user defined functions or plugins without having to program. For example, imagine I use "function1" in several Smath projects. I want to be able to use this "function1" in all of my sheets without having to redefine "function1" in every project. Please this would be very helpful for me. Thank you for your suggestions. Fernando
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
|
Russia ☭ forever Viacheslav N. Mezentsev |
1 user thanked uni for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 276 Was thanked: 91 time(s) in 57 post(s)
|
|
|
2 users thanked alyles for this useful post.
|
on 19/12/2016(UTC), on 20/12/2016(UTC)
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: fernando_92 For example, imagine I use "function1" in several Smath projects. I want to be able to use this "function1" in all of my sheets without having to redefine "function1" in every project. That's what the "plugin Include" does. 1. Plug these two in the same directory. 2. Open "Genfit Algo Include Test.sm" 3. It will ask to install "include Plugin", install. 4. Press F9 to calculate work sheet. Please confirm if it works for you. Was created Smath 5346, works fine latest Smath 6179. Jean Genfit Algo Include.sm (14kb) downloaded 17 time(s). Genfit Algo Include Test.sm (17kb) downloaded 16 time(s).
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 19/12/2016(UTC) Posts: 3
|
Hello, thank you for your suggestions, plugin " Include " works for me. It is really helpful. I will have to test its limits. But I would like to know now what is the difference between Snippets and the "Include" Plugin ? Why couldn't we just use snippets? Thank you!
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 276 Was thanked: 91 time(s) in 57 post(s)
|
Both Snippets and Include you have a "master" worksheet that includes all the functions you'd like to incorporate into the worksheet. With Snippets, you actually create a copy of the "master" and essentially paste it into the worksheet that you are using. It puts the copied worksheet into a collapsible area so you can minimize it if you'd like. Advantages and disadvantages to this approach are as follows. 1.) You have direct access to the function definitions. You can see how you wrote a certain function or make changes in your local copy but they don't get updated in the "master" snippet. 2.) If you update the "master" snippet worksheet, it does NOT update worksheets where the snippet as been used. You would have to re-add the snippet in subsequent worksheets to update. With the Include plugin, you are essentially running the "master" worksheet in the background and you have access to the results and functions defined in that worksheet. This has the potential advantages/disadvantages of 1.) Cannot see or change the function definitions in the local worksheet. 2.) An update in the "master" worksheet will be immediately available to any worksheets that include the master. I prefer snippets for managing functions a couple reasons. 1.) I like to have the local copy of the functions in the worksheet. I often make worksheets and don't come back to them for months or years at a time. When I do, I like to see the state of the functions that I used at that time. Everything I need is in one worksheet. If I were to use the include plugin and for any reason I lost or misplaced the master Include worksheet, I'd be SOL. 2.) I think I ran into the issue with the include plugin with which function Descriptions don't get passed from one worksheet to another. I often write a lot of detail on how some of my more complicated functions work so they can be useful to others or so I can remember how to use them properly. Using the include plugin, you'd have to go to the master worksheet to see that information I find include plugin to be much more useful for transferring results. Perhaps I create a worksheet to solve for the output of a certain circuit. I then want to use the results of that for the input of another circuit. I may use the include plugin in that situation. Edited by user 20 December 2016 16:53:11(UTC)
| Reason: Not specified |
|
1 user thanked alyles for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Thanks for the ellaborate distinction. "Snippets" is like a plugin, like something done for ever [so to speak]. I understand better how to manage "Include". Looks much easier to recompose a stand alone work sheet to share in the forum.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: fernando_92 Hello, thank you for your suggestions, plugin " Include " works for me. It is really helpful. I will have to test its limits. But I would like to know now what is the difference between Snippets and the "Include" Plugin ? Why couldn't we just use snippets? Thank you! Fernando: Did the 2nd "Fourier" example work ? It didn't work for me the first time. It couldn't find the Matlab "mwXXX.." library. By luck I type 'mwbesselj(1,1.23456789) in new sheet. It did want to install the 8 MB Matlab stuff, YES, done, then the Fourier is available. Viacheslav replied: repaired. Jean
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
How to share user defined functions or plugins without programming?
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.