Script Region

Script Region - Extends SMath Studio with a Script Region (c#, vb.net, python) - Сообщения

#21 Опубликовано: 18.07.2018 14:46:46
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Updated. System.Diagnostics namespace added.

Script.Process.sm (4 КиБ) скачан 145 раз(а).

2018-07-18_22-41-20.png

@echo off
echo Hello
exit

Показать спойлер

Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
frapuano 18.07.2018 17:17:00
#22 Опубликовано: 15.08.2018 01:53:00
KhasanMamaev

KhasanMamaev

3 сообщений из 5 понравились пользователям.

Группа: User

Вячеслав благодарю за Скрипт регион. Этот инструмент делает возможности СМат Студии практически безграничными. Немного программирую на Python. Я так понимаю, что в Script Region используется
IronPython?
#23 Опубликовано: 15.08.2018 04:32:44
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Да, используется IronPython.
Russia ☭ forever, Viacheslav N. Mezentsev
#24 Опубликовано: 17.09.2018 00:22:21
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Updated.

- input placeholder removed;
- terms variable removed;
- SMath.Controls assembly added.
Russia ☭ forever, Viacheslav N. Mezentsev
#25 Опубликовано: 18.09.2018 10:26:21
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Updated. Version 0.2.x.x.

Changes:
- xml serialization format changed;
- reworked.

Old versions of the plugin will not be able to open files of a new format.

Wrote

You can change font with mouse wheel and Control key when region selected.


Disabled until the better implementation.
Russia ☭ forever, Viacheslav N. Mezentsev
#26 Опубликовано: 10.10.2018 17:36:37

Farja

1 сообщений из 7 понравились пользователям.

Группа: User

Hi,

With the last changes in the plugin, this simple script to get the filename of the current worksheet stop working:

store.AddDefinition( terms[0].Text, new Term[0], new Entry( "\"" + store.FileName + "\"" ) );

The original question, and the script to get the filename its from this post:

https://en.smath.info/forum/yaf_postsm39408_MathcadFileAccess.aspx#post39408

Thanks for your help!
#27 Опубликовано: 11.10.2018 03:54:40
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

2018-10-11_11-54-00.png
Russia ☭ forever, Viacheslav N. Mezentsev
#28 Опубликовано: 12.10.2018 12:35:58

Farja

1 сообщений из 7 понравились пользователям.

Группа: User

Thanks Uni! That change did the trick
#29 Опубликовано: 14.11.2019 02:04:35
KhasanMamaev

KhasanMamaev

3 сообщений из 5 понравились пользователям.

Группа: User

I want to show you a video about the operation of the Script Region plugin


1 пользователям понравился этот пост
#30 Опубликовано: 04.03.2021 18:56:16
Wesly Centerwall

Wesly Centerwall

26 сообщений из 156 понравились пользователям.

Группа: User

What happened to this plugin? Seems like it had a lot of potential.
#31 Опубликовано: 05.03.2021 01:03:05
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

I don't have time to finalize his code editor. Now it is inconvenient to use it.
Russia ☭ forever, Viacheslav N. Mezentsev
#32 Опубликовано: 08.03.2021 08:54:24
João Felipe Seráfico Melo

João Felipe Seráfico Melo

7 сообщений из 62 понравились пользователям.

Группа: User

Hi, uni!

I'm wondering if the script region for VB would allow me to access a COM engine.
I'm trying to use Autodesk Robot via SMath thorugh its API.
Is there any chance of success in this endeavour?
A simple example of what I've got:

Imports System
Imports RobotOM

Module Program
Sub Main()
Dim robapp As IRobotApplication
robapp = New RobotApplication
robapp.Project.CalcEngine.Calculate()
robapp.Project.Close()
robapp = Nothing
End Sub
End Module
#33 Опубликовано: 08.03.2021 09:11:50
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

As far as I know, there are theoretically no restrictions of any kind. But practically in the plugin code the list of used libraries is strictly specified. In order to use COM-objects, the text of the program is not enough. It is necessary to make it clear to the linker what this program is composed of. Therefore, it will definitely not work now, since even the import directive is not supported.

I can expand the script format like Jon Skeet did. I didn't find an example, but he suggested splitting the code into two parts: a header and a script. Three dots are used as a separator. The header consists of an import list. This list can be used to partially restore dependencies.

In general, it is possible to modify the plugin to do this kind of thing. But I have my own job and it is difficult for me to make significant changes in the existing code.
Russia ☭ forever, Viacheslav N. Mezentsev
#34 Опубликовано: 08.03.2021 15:33:46
João Felipe Seráfico Melo

João Felipe Seráfico Melo

7 сообщений из 62 понравились пользователям.

Группа: User

Thanks for your reply, uni

I totally understand. I'll probably need to use the API via Excel then.
#35 Опубликовано: 16.11.2022 11:30:04
Camilo

Camilo

2 сообщений из 1 понравились пользователям.

Группа: User

Hi,

This plugin cant be installed on the latest version of Smath:

Error Smath Studio_Script Region.png

2 пользователям понравился этот пост
Вячеслав Мезенцев 16.11.2022 12:53:00, Thiago Pereira 30.11.2022 11:43:00
#36 Опубликовано: 30.11.2022 11:46:58
Thiago Pereira

Thiago Pereira

0 сообщений из 5 понравились пользователям.

Группа: User

Same as Camilo. Error to/ or update/ reinstall plugin.

ScriptRegion_Error.jpg
#37 Опубликовано: 02.12.2022 05:06:36
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

The problem appeared, but its cause is not yet clear. I'll let you know when it's resolved.
Russia ☭ forever, Viacheslav N. Mezentsev
#38 Опубликовано: 02.12.2022 13:41:05
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

74 сообщений из 164 понравились пользователям.

Группа: User

Viacheslav,

I was developing an plugin between v1.0 and v0.99 and while my plugin 'worked,' I noticed my region interfered with the graphics (local version, in debug mode), that is the graphics fail to print (and sometimes load) when the region was processed/drawn. I had to reference the version specific *.dlls and that solved my problem. As such, I also noticed that some of the properties/classes changed ever so slightly (not enough to fail a compile, but enough to interfere with operations).

I didn't document this in detail though. I'm just wondering if you have some elements tied to the v0.99- that the v1.00+ no longer implements.


This is an amazing tool; thank you for developing it and I hope you are able to restore its functionality!

-Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#39 Опубликовано: 15.09.2024 02:40:31
usamakhan

usamakhan

3 сообщений из 75 понравились пользователям.

Группа: User

Is there any plan to implement this plugin in Linux? For instance I have some chemical engineering python libraries & during calculation data exchange between SMath & terminal will be of great value.
#40 Опубликовано: 16.09.2024 01:30:39
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

I need to rewrite the code editor, the problem is in its use or I need to replace it with another one. This is a complex job requiring great attention to detail.
Using the built-in programming language in the document has not been needed by many people yet. I postponed the implementation until better times.
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Oscar Campo 18.09.2024 22:49:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений