Rank: Member Groups: Registered
Joined: 23/01/2017(UTC) Posts: 16 Location: Moscow
|
Собственно несколько вопросов, как: 1. Написать скрипт 2. Внутри тела скрипта использовать переменные Smath 3. Запускать скрипт по кнопке из exe представления Smath Код на C# - примерный Code:
using Kompas6API7;
using System.Runtime.InteropServices;
try
{
Kompas6API7.IApplication kompas = (_Application)Marshal.GetActiveObject("KOMPAS.Application.7");
IKompasDocument doc = kompas.App.Documents.Open("test", true, true);
IKompasDocument3D doc3D = kompas.App.ActiveDocument as IKompasDocument3D;
doc.Close(DocumentCloseOptions.kdDoNotSaveChanges);
doc3D.Close()
}
catch (Exception)
{
kompas = null;
}
kompas = null;
С уважением!
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,650 Location: Italy Was thanked: 1338 time(s) in 878 post(s)
|
|
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Member Groups: Registered
Joined: 23/01/2017(UTC) Posts: 16 Location: Moscow
|
Hello
Davide Carpi
Thanks for the reply. I'll try workarounds, if that happen I will try to put.
|
|
|
|
Rank: Member Groups: Registered
Joined: 23/01/2017(UTC) Posts: 16 Location: Moscow
|
Arose fair question. How to close the Preview window (*.exe file) after clicking links
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,650 Location: Italy Was thanked: 1338 time(s) in 878 post(s)
|
Originally Posted by: Kriss I guess it is the hyperlink region. Alignment feature of hyperlinks is not available; I'll take a look on it when possible. I'm not able to reproduce the 2nd issue, anyone else experienced this? Edited by user 25 January 2017 12:45:46(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 |
|
|
|
Rank: Member Groups: Registered
Joined: 23/01/2017(UTC) Posts: 16 Location: Moscow
|
Hello Davide Carpi I decided to use Smath Studio ( Smath Viewer) as form to enter and calculate data. The user then presses the Start button (as shown in the picture) and then start my program. So I would like not to confuse the user and close the data entry form, ie Smath Viewer (executable file *.exe) With best wishes Edited by user 25 January 2017 18:06:20(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member Groups: Registered
Joined: 23/01/2017(UTC) Posts: 16 Location: Moscow
|
And another question
since You are a developer Hyperlink Region
It is possible to expand the possibilities of this Extensions: Add command-line arguments when you start the program
For example: "CalcMass.exe - ExchangeData.ods"
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,650 Location: Italy Was thanked: 1338 time(s) in 878 post(s)
|
Originally Posted by: Kriss Hello Davide Carpi
I decided to use Smath Studio (Smath Viewer) as form to enter and calculate data. The user then presses the Start button (as shown in the picture) and then start my program. So I would like not to confuse the user and close the data entry form, ie Smath Viewer (executable file *.exe)
With best wishes Ah, ok! Sometimes is not possible to close the viewer because internal exceptions, so I've thought about a bug. I'll check if there is a safe way to kill the application within the hyperlink. You can always add a text to ask the users that after clicking the link they can safely close the program. Originally Posted by: Kriss It is possible to expand the possibilities of this Extensions: Add command-line arguments when you start the program
For example: "CalcMass.exe - ExchangeData.ods" You already can; right click on the region, choose "Flags..." from the context menu, and then add the arguments you need. Edited by user 25 January 2017 19:58:04(UTC)
| Reason: typo |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Member Groups: Registered
Joined: 23/01/2017(UTC) Posts: 16 Location: Moscow
|
Thank you very much Really works with the flags
|
|
|
|
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.