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

Notification

Icon
Error

Login


2 Pages<12
Options
Go to last post Go to first unread
Offline Jean Giraud  
#21 Posted : 01 March 2017 21:59:41(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)
Forum Var name.sm (14kb) downloaded 30 time(s).
Offline uni  
#22 Posted : 05 March 2017 18:41:32(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
Вот так можно решить задачу при помощи компонента Скрипт.

Code:
var defs = Enumerable.Range( 0, store.Count ).Select( n => store[n] ).ToList();
var args = ( Entry.Create( terms ) ).Items.ToList();

var vars = args.Take(4).Select( x => new Entry( "\"" + x.Text + "\"" ) ).ToList();
var vals = args.Take(4).ToList();
var desc = args.Take(4)
    .Select( x => defs.Find( d => d.Name.Equals( x.Text ) ).Description )
    .Select( x => new Entry( "\"" + x + "\"" ) ).ToList();

var rows = new Entry( "4" );
var cols = new Entry( "3" );

var mat = new Entry( "mat", TermType.Function, new Entry[] 
{
    vars[0], vals[0], desc[0], 
    vars[1], vals[1], desc[1], 
    vars[2], vals[2], desc[2],
    vars[3], vals[3], desc[3],
    rows, cols 
} );

store.AddDefinition( args[4].Text, new Term[0], mat );


2017-03-05 20-38-03 SMath Studio - [Script. Kross example 1.sm ].png

Script. Kross example 1.sm (7kb) downloaded 13 time(s).
Script. Kross example 1.pdf (19kb) downloaded 15 time(s).
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 06/03/2017(UTC)
Offline mkraska  
#23 Posted : 05 March 2017 20:11:20(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)
Is there access to some list of definitions in the sheet? The script example seems to reqire explicit specification, which variables are to be processed. Could I just ask to export everything (excluding pre-defined names)?

If specification of the variables is acceptable, then the matrix can be created relying on math regions only.

export.sm (7kb) downloaded 12 time(s).
2017-03-05 18_00_56-SMath Studio 0.98.6179 - [Script.%20Kross%20example%201.sm_].png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 05/03/2017(UTC)
Offline uni  
#24 Posted : 05 March 2017 20:22:28(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
Originally Posted by: mkraska Go to Quoted Post
Is there access to some list of definitions in the sheet? The script example seems to reqire explicit specification, which variables are to be processed. Could I just ask to export everything (excluding pre-defined names)?

Yes, the first line do it.

Code:
var defs = Enumerable.Range( 0, store.Count ).Select( n => store[n] ).ToList();


This means: get all enabled definitions.

How to check this.

Code:
var defs = Enumerable.Range( 0, store.Count )
    .Select( n => store[n] )
    .ToList();

defs.ForEach( d => store.TraceData( d.ToString() ) );


2017-03-05 22-21-48 SMath Studio - [List1 ].png


Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 05/03/2017(UTC)
Offline mkraska  
#25 Posted : 05 March 2017 20:35:01(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 just downloaded the script region and pasted the code above into it and set language to C#.

This gives the error message in the output window:

Die Datei oder Assembly "LinqBridge, Version=1.3.0.0, Culture=neutral, PublicKeyToken=c2b14eb747628076" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.

(system can't find the file)

SMath Studio: SMath Studio Desktop 0.98.6179.21440, portable, x86
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 (Windows 7 Professional , x64)
Screen: 1920x1080 px, 96x96 dpi
Localization: separator=<semicolon>; decimal symbol=<comma>; system decimal symbol=<comma>; language=GER
Frameworks: CLR 2.0.50727.5485

installed versions:
v2.0.50727 2.0.50727.5420 SP2
v3.0 3.0.30729.5420 SP2
v3.5 3.5.30729.5420 SP1
v4
Client 4.6.01055
Full 4.6.01055
v4.0
Client 4.0.0.0
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline uni  
#26 Posted : 05 March 2017 20:42:56(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
Try to remove it manually and update again (20ad815b-bc5e-487d-9258-57fde2ac6de8).
For 0.98.6179 last version is 0.1.6273.2204.

Edited by user 05 March 2017 20:48:13(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
Offline mkraska  
#27 Posted : 05 March 2017 21:36: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)
I deleted the dir and re-installed from extension manager (I did this just some hours ago, thus if the online gallery didn't change, then this didn't change anything locally).

There is a file LinqBridge.dll, yet the log file says

05.03.2017 19:30:58 [INFO ] Script Region, version 0.1.6273.2204, Sonntag, 5. März 2017 01:13:28
05.03.2017 19:31:28 [ERROR] Die Datei oder Assembly "LinqBridge, Version=1.3.0.0, Culture=neutral, PublicKeyToken=c2b14eb747628076" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.

It says that LinqBridge or a dependence of it was not found.

Same message in the output window.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline uni  
#28 Posted : 05 March 2017 21:51:30(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
I think I found the problem. Plugin updated, please try again.
Russia ☭ forever
Viacheslav N. Mezentsev
Offline mkraska  
#29 Posted : 05 March 2017 22:08:45(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)
Sorry, didn't solve the problem. This is what the log says:

05.03.2017 20:05:57 [INFO ] Script Region, version 0.1.6273.19487, Sonntag, 5. März 2017 10:49:34
05.03.2017 20:06:20 [ERROR] Die Datei oder Assembly "LinqBridge, Version=1.3.0.0, Culture=neutral, PublicKeyToken=c2b14eb747628076" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline uni  
#30 Posted : 05 March 2017 22:15:03(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
I forgot to replace Tech.CodeGeneration.dll. Plugin updated, try again.

Edited by user 05 March 2017 22:24:19(UTC)  | Reason: Not specified

Russia ☭ forever
Viacheslav N. Mezentsev
Offline mkraska  
#31 Posted : 05 March 2017 22:34:13(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)
05.03.2017 20:31:31 [INFO ] Script Region, version 0.1.6273.20457, Sonntag, 5. März 2017 11:21:54
05.03.2017 20:31:54 [ERROR] Die Datei oder Assembly "LinqBridge, Version=1.3.0.0, Culture=neutral, PublicKeyToken=c2b14eb747628076" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline uni  
#32 Posted : 06 March 2017 07:37:04(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
Originally Posted by: mkraska Go to Quoted Post
05.03.2017 20:31:31 [INFO ] Script Region, version 0.1.6273.20457, Sonntag, 5. März 2017 11:21:54
05.03.2017 20:31:54 [ERROR] Die Datei oder Assembly "LinqBridge, Version=1.3.0.0, Culture=neutral, PublicKeyToken=c2b14eb747628076" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.

Only portable version not working or both?
Russia ☭ forever
Viacheslav N. Mezentsev
Offline mkraska  
#33 Posted : 06 March 2017 10:23:51(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: uni Go to Quoted Post

Only portable version not working or both?

Good point, installer version works. But installer version is a bad place for experiments.

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline uni  
#34 Posted : 06 March 2017 10:43:08(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
Ok, I need portable version. How I can get it? This link not working for me.
Russia ☭ forever
Viacheslav N. Mezentsev
Offline mkraska  
#35 Posted : 06 March 2017 10:56:55(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)
Currently the link is broken. Unpacking the linux version to some directory and placing an empty file "portable.version" in the install dir is a workaround (or better: the official way).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline uni  
#36 Posted : 06 March 2017 12:21:52(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
Well, I reproduced the problem. It is much harder to fix than I thought before (I don't know why it is happening for portable version).
Russia ☭ forever
Viacheslav N. Mezentsev
Offline uni  
#37 Posted : 06 March 2017 15:01:52(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
Сontinue in this topic.
Russia ☭ forever
Viacheslav N. Mezentsev
Offline Davide Carpi  
#38 Posted : 17 March 2017 18:42:30(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)
Something close to your request (input must be provided with strings, output is automated and issues reported in trace window)

name+value+description.sm (8kb) downloaded 23 time(s).

2017-03-17 16_41_00-SMath Studio - [name+value+description.sm_].png

Edited by user 17 March 2017 18:51:23(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
Users browsing this topic
2 Pages<12
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.