how to know the name of the variable - Сообщения
#21 Опубликовано: 01.03.2017 15:59:41
Forum Var name.sm (13 КиБ) скачан 52 раз(а).
#22 Опубликовано: 05.03.2017 12:41:32
Вот так можно решить задачу при помощи компонента Скрипт.
![2017-03-05 20-38-03 SMath Studio - [Script. Kross example 1.sm ].png](/ru-RU/file/PV2XNT/2017-03-05-20-38-03-SMath-Studio---_Script_-Kross-example-1_sm-__png)
Script. Kross example 1.sm (6 КиБ) скачан 35 раз(а).
Script. Kross example 1.pdf (18 КиБ) скачан 40 раз(а).
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 );
Script. Kross example 1.sm (6 КиБ) скачан 35 раз(а).
Script. Kross example 1.pdf (18 КиБ) скачан 40 раз(а).
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Davide Carpi 05.03.2017 20:12:00
#23 Опубликовано: 05.03.2017 14:11:20
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 (6 КиБ) скачан 32 раз(а).
![2017-03-05 18_00_56-SMath Studio 0.98.6179 - [Script.%20Kross%20example%201.sm_].png](/ru-RU/file/GQZK4L/2017-03-05-18_00_56-SMath-Studio-0_98_6179---_Script__20Kross_20example_201_sm___png)
If specification of the variables is acceptable, then the matrix can be created relying on math regions only.
export.sm (6 КиБ) скачан 32 раз(а).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Вячеслав Мезенцев 05.03.2017 14:14:00
#24 Опубликовано: 05.03.2017 14:22:28
WroteIs 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.
var defs = Enumerable.Range( 0, store.Count ).Select( n => store[n] ).ToList();
This means: get all enabled definitions.
How to check this.
var defs = Enumerable.Range( 0, store.Count )
.Select( n => store[n] )
.ToList();
defs.ForEach( d => store.TraceData( d.ToString() ) );
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Martin Kraska 05.03.2017 14:32:00
#25 Опубликовано: 05.03.2017 14:35:01
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=; decimal symbol=; system decimal symbol=; 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
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=
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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#26 Опубликовано: 05.03.2017 14:42:56
Try to remove it manually and update again (20ad815b-bc5e-487d-9258-57fde2ac6de8).
For 0.98.6179 last version is 0.1.6273.2204.
For 0.98.6179 last version is 0.1.6273.2204.
Russia ☭ forever, Viacheslav N. Mezentsev
#27 Опубликовано: 05.03.2017 15:36:49
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.
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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#28 Опубликовано: 05.03.2017 15:51:30
I think I found the problem. Plugin updated, please try again.
Russia ☭ forever, Viacheslav N. Mezentsev
#29 Опубликовано: 05.03.2017 16:08:45
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.
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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#30 Опубликовано: 05.03.2017 16:15:03
I forgot to replace Tech.CodeGeneration.dll. Plugin updated, try again.
Russia ☭ forever, Viacheslav N. Mezentsev
#31 Опубликовано: 05.03.2017 16:34:13
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.
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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#32 Опубликовано: 06.03.2017 01:37:04
Wrote05.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
#33 Опубликовано: 06.03.2017 04:23:51
Wrote
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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#34 Опубликовано: 06.03.2017 04:43:08
Ok, I need portable version. How I can get it? This link not working for me.
Russia ☭ forever, Viacheslav N. Mezentsev
#35 Опубликовано: 06.03.2017 04:56:55
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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#36 Опубликовано: 06.03.2017 06:21:52
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
#37 Опубликовано: 06.03.2017 09:01:52
Сontinue in this topic.
Russia ☭ forever, Viacheslav N. Mezentsev
#38 Опубликовано: 17.03.2017 12:42:30
Something close to your request (input must be provided with strings, output is automated and issues reported in trace window)
name+value+description.sm (7 КиБ) скачан 44 раз(а).
![2017-03-17 16_41_00-SMath Studio - [name+value+description.sm_].png](/ru-RU/file/CYXgmr/2017-03-17-16_41_00-SMath-Studio---_name_value_description_sm___png)
name+value+description.sm (7 КиБ) скачан 44 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
-
Новые сообщения
-
Нет новых сообщений