Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline uni  
#1 Posted : 20 June 2014 13:30:40(UTC)
uni


Rank: Advanced Member

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

Was thanked: 496 time(s) in 319 post(s)
C# and VB.Net:
Do not use directive "using". You just need to fill function body.


Links:

1. Fast Colored TextBox for Syntax Highlighting (Pavel Torgashov).
2. Runtime-генерирование .Net-кода для тех, кому некогда (Андрей Мартынов).
3. Scripting .NET Applications with IronPython (Jerome Terry).

Edited by user 01 February 2016 15:00:07(UTC)  | Reason: Not specified

File Attachment(s):
Example 1.sm (3kb) downloaded 86 time(s).
Example 2.sm (3kb) downloaded 59 time(s).
Example 3.sm (5kb) downloaded 64 time(s).
uni attached the following image(s):
2014-06-20 16-27-41 Скриншот экрана.png
Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 21/06/2014(UTC)
Offline uni  
#2 Posted : 20 June 2014 18:50:01(UTC)
uni


Rank: Advanced Member

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

Was thanked: 496 time(s) in 319 post(s)
Updated.
uni attached the following image(s):
2014-06-20 21-47-03 SMath Studio Desktop - [CS. Example 1.sm].png
Russia forever!
Viacheslav N. Mezentsev
Offline uni  
#3 Posted : 21 June 2014 08:53:48(UTC)
uni


Rank: Advanced Member

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

Was thanked: 496 time(s) in 319 post(s)
Updated. Python also works but w/o syntax highlighting.
File Attachment(s):
Python. Example 1.sm (4kb) downloaded 74 time(s).
uni attached the following image(s):
2014-06-21 11-47-14 SMath Studio Desktop - [Python. Example 1.sm ].png
Russia forever!
Viacheslav N. Mezentsev
Offline uni  
#4 Posted : 28 October 2014 23:10:34(UTC)
uni


Rank: Advanced Member

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

Was thanked: 496 time(s) in 319 post(s)
Updated. Small improvements.

Test c# script:

Code:
Func<string,int> Log = delegate( string text ) {
    
    store.TraceData( String.Format( "{0} {1} [INFO ] {2}",
        DateTime.Now.ToShortDateString(), DateTime.Now.ToLongTimeString(),
        text ) );
    return 0;
};

try {

    for ( int n = 0; n < store.Count; n++ )
        Log( String.Format( "{0}: {1}", n, store[n].ToString() ) );

} catch ( Exception ex ) {

    Log( ex.Message );
}
Russia forever!
Viacheslav N. Mezentsev
Offline uni  
#5 Posted : 01 February 2016 20:08:32(UTC)
uni


Rank: Advanced Member

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

Was thanked: 496 time(s) in 319 post(s)
The source code has been restored, updated and uploaded to svn. Something does not work yet (last example). The plugin is not available, because Release Manager can't build it (too complex I think).

Edited by user 01 February 2016 20:10:13(UTC)  | Reason: Not specified

Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 01/02/2016(UTC)
Offline uni  
#6 Posted : 02 February 2016 10:44:50(UTC)
uni


Rank: Advanced Member

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

Was thanked: 496 time(s) in 319 post(s)
Updated (svn). Now last example works and we are waiting when Andrey fix the Release Manager.
Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 03/02/2016(UTC)
Offline uni  
#7 Posted : 09 February 2016 07:11:56(UTC)
uni


Rank: Advanced Member

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

Was thanked: 496 time(s) in 319 post(s)
Updated. Now available.
Russia forever!
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 09/02/2016(UTC)
Offline Razonar  
#8 Posted : 24 May 2016 00:12:44(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 71
Uruguay

Was thanked: 5 time(s) in 3 post(s)
Hi Uni. Admirable work, thanks a lot for this plugin. Just few questions:

- From where plugin's take c#, vb.net and python ¿(i.e. came when plugin is downloaded)?
- ¿Can call nympi or Sci python?
- ¿Can you show how to modify some SMtah's vector or matrix variable? In other words, ¿there are an output, avoiding handling files, to smath worksheet or only can view results in the trace window?
- Not related with your plugin, but ... easy asking you: SMath don't have maple's traperror or mathcad onerror functions?

Have a nice day.

Alvaro.

Edited by user 24 May 2016 00:14:18(UTC)  | Reason: Not specified

Offline uni  
#9 Posted : 25 May 2016 10:41:58(UTC)
uni


Rank: Advanced Member

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

Was thanked: 496 time(s) in 319 post(s)
Originally Posted by: Razonar Go to Quoted Post
- From where plugin's take c#, vb.net and python ¿(i.e. came when plugin is downloaded)?
- ¿Can call nympi or Sci python?
- ¿Can you show how to modify some SMtah's vector or matrix variable? In other words, ¿there are an output, avoiding handling files, to smath worksheet or only can view results in the trace window?

c#, vn.net from the .Net Framework which is already installed on your PC.
As for the python I used IronPython which is a part of the plugin.
Not shure about numpi and Sci. I think it is impossible use them now.

You can modify and add definitions to the worksheet dynamically (inside the script). It not so simple to show how you can use this, I need a time to make an example.

Russia forever!
Viacheslav N. Mezentsev
Offline Tinu  
#10 Posted : 27 May 2016 14:11:50(UTC)
Tinu


Rank: Member

Groups: Registered
Joined: 04/01/2014(UTC)
Posts: 19
Man
Switzerland
Location: Bern

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

c#, vn.net from the .Net Framework which is already installed on your PC.
As for the python I used IronPython which is a part of the plugin.
Not shure about numpi and Sci. I think it is impossible use them now.

You can modify and add definitions to the worksheet dynamically (inside the script). It not so simple to show how you can use this, I need a time to make an example.



Examples (specially regarding Python) would be greatly appreciated!Clap

Tinu


thanks 1 user thanked Tinu for this useful post.
on 27/05/2016(UTC)
Offline ahmetanildindar  
#11 Posted : 06 August 2016 16:22:58(UTC)
ahmetanildindar

Rank: Newbie

Groups: Registered
Joined: 23/08/2015(UTC)
Posts: 2
Turkey

Dear all,
I donwloaded @uni's #3 smath file. Tried to understand but it seems more explanation is needed for low level users like me Good


It would be really perfect having Python scripts running within Smath.

Is there any ongoing effort?

++Ahmet
Users browsing this topic
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.