Subscribe to this thread
Home - General / All posts - mpanifold feature and Microsoft IDE SDK
lionel

995 post(s)
#17-Dec-17 20:43

Hi about manifold feature ....

1) which Microsoft SDK framework , microsoft IDE version umber could be use for write plugin ?

see blend capture screen

2) Is there a documentation for Manifold features version ?

the doc refer only 2 manifold and radian studio = viewer

http://www.manifold.net/info/documentation.shtml

3) for plugin which kind of app should i choose in VStudio ?

http://www.manifold.net/info/scripting.shtml

4) Does file project use in visualstudio 2015 and VS 2017 and VScode are the same ?

5) which dll should be import for

radian studio 9, manifold 8, manifold feature !

Thank's

Attachments:
MF_micrsoft_ecosystem.png


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

lionel

995 post(s)
#17-Dec-17 22:25

for information https://dzone.com/articles/what-anycpu-really-means-net


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

lionel

995 post(s)
#17-Dec-17 22:48

6 ) can we use

static void Main(string[] args) in C# plug in script to enter value using console ?

c# plugin 

using System;

using System.Text;

class Script

{

    static Manifold.Context Manifold;

 

        static void Main(string[] args)

        {

            StringBuilder hello = new StringBuilder();

            hello.Append("Hello from the add-in!");

            Manifold.Application app = Manifold.Application;

            app.Log(hello.ToString());

            app.Log("The opened MAP file contains the following components:");

            app.OpenLog();

            Console.WriteLine("hello world!");

            Console.Write("Press any key to continue...");

            Console.ReadKey(true);

        }

    }

7) does manifold has a console do to that rather the windows console ?

8) Does the word SCript is the only word we have to use in plug in C#script

9) any namespace to library ll be load . import in cs file with the key word "using" so nothing to configure ( reference ) to help radian locate the dll file ?

Attachments:
radian_noEntryScript.png


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

adamw


10,447 post(s)
#20-Dec-17 08:53

6, 7 - You cannot use Console. If you want to print some data, use Application.Log. If you want to input some data, you have to create the UI for that (ie, create a form).

8 - You have to name the class Script, yes. The entry point of the add-in has to be Script.Main.

9 - To let the add-in reference a DLL, use $reference in the initial comments.

Example:

// C#

//

// $reference: System.Windows.Forms.dll

 

using WF = System.Windows.Forms;

 

class Script

{

 

static Manifold.Context Manifold;

static void Main()

{

  WF.MessageBox.Show("Hello from add-in!");

}

 

}

Hope this helps.

lionel

995 post(s)
#05-Jan-18 02:33

really basic question ( newbies) : how can i use call a form class inside Manifold 9 script ( not plug in command) using iron python ?

#Ironpython

import clr

clr.AddReference('System.Windows.Forms')

clr.AddReference('System.Drawing')

from System.Windows.Forms import (

    Application, Form,

    FormBorderStyle, Label

)

from System.Drawing import (

Color, Font, FontStyle, Point

)

class MainForm(Form):

    def __init__(self):

        self.Text = "Hello World" 

        self.FormBorderStyle = FormBorderStyle.Fixed3D

        self.Height = 150

        newFont = Font("Verdana", 16,FontStyle.Bold | FontStyle.Italic)

        label = Label()

        label.AutoSize = True

        label.Text = "My Hello World Label"

        label.Font = newFont

        label.BackColor = Color.Aquamarine

        label.ForeColor = Color.DarkMagenta

        label.Location = Point(10, 50)

        self.Controls.Add(label)

def Main():

 mainForm = MainForm()

 Manifold.Application.????(mainForm) #messagebox  !!?? 

Thank's

http://www.manifold.net/doc/api/scripts-net.html

https://msdn.microsoft.com/fr-fr/library/system.windows.forms.messagebox.show(v=vs.110).aspx

Attachments:
ironpython_test_m9.map


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

adamw


10,447 post(s)
#05-Jan-18 12:03

Use Form.ShowDialog:

#IronPython

 

<your code up until Main>

 

def Main():

  mainForm = MainForm()

  mainForm.ShowDialog()

ShowDialog returns the result with which the form was closed, you will likely want to inspect it, pass entered data using form variables, etc.

adamw


10,447 post(s)
#20-Dec-17 08:40

1 - You can write add-ins in any language you can use in scripts. If you are writing in a .NET language, you can compile the add-in into a DLL. In the screen above, normally you would use Classic Desktop.

2 - Documentation for the object model for .NET and COM languages is on the API web site:

Object model for .NET / COM

There are no specific examples for add-ins, we should perhaps add some. That said, add-ins work similarly to scripts, they are just stored outside of any data source, the calls are the same.

3 - Class Library.

4 - It does not matter whether you use VS 2015, VS 2017 or VS Code. You can write an add-in using any of these environments (or using some other environment).

5 - The DLL that contains the object model for .NET / COM is named EXTNET.DLL. That's for Radian / Future. With Manifold 8 you use Manifold.Interop.DLL.

lionel

995 post(s)
#21-Dec-17 09:41

thank's a lot for all yours replies . it ll be heplfull


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

lionel

995 post(s)
#05-Jan-18 02:53

Hi

"""5) - The DLL that contains the object model for .NET / COM is named EXTNET.DLL. That's for Radian / Future. With Manifold 8 you use Manifold.Interop.DLL."""

for manifold 9 the dll is the same name Manifold.Interop.DLL ?

thank's


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

adamw


10,447 post(s)
#12-Jan-18 08:57

No, the names are different.

If you are developing an application that uses Manifold 8 object model, use Manifold.Interop.DLL.

If you are developing an application that uses Manifold 9 / Radian object model, use EXTNET.DLL.

lionel

995 post(s)
#31-Dec-17 20:11

i think example about plugin should show

--a input form or selection list initiate from table component and output textarea after compute data .

--the way to call a file2.cs file locate near the file1.cs file ( file1 contain Script entry )

-----external file should be form or algo library

-- form , wpf ,xaml version of hello word

-- ironpython python C#

When script active and run :

a) if it fail i have a windows that appear in the namescript tab show this text Can't create script engine

b)if i use log it ll be nice that the log appezar inthe same windows /tab of the name script like a) . I Think the last version do this for drawing . Drawing in the top and table with tecord under ...

regard's

Attachments:
ironryby_widnowslog.png


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

lionel

995 post(s)
#31-Dec-17 20:39

like a chrome console that could be detach !!!


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

adamw


10,447 post(s)
#02-Jan-18 07:22

Thanks, we will try to illustrate all of the things you mention (forms / UI, linking external code, different languages).

lionel

995 post(s)
#12-Jan-18 00:21

Hi

Is there a way to retrieve the name of the map file ( show in the top left corner ) that is open using some code inside the add in command script ? ( C:\..\manifold-future\shared\windowform.cs ) .

Manifold 8 has document but for manifold 9 does all have to be done using the 2 table locate inside "System Data" directory ?

regard's


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

adamw


10,447 post(s)
#12-Jan-18 09:01

You can retrieve the connection string for the root database using Database.Connection, then parse it into individual properties using Application.CreatePropertySetParse and get the value of the 'Source' property, which will be either the path to the opened file or an empty string if the file has not been saved yet.

lionel

995 post(s)
#16-Jan-18 04:05

Hi

I open a test.map file using manifold future ; the name of map file appear in the top left side : i want to retrieve this value . So if manifold future is SQL engine oriented i should find the name somewhere in a table !! ??? but not ...See the capture screen

neither mfd_root or mfd_meta have property=source !!

mdf_root don't contain directory information only pure data

mfd_meta property path seem to contain value ( here variable that contain value )

I shure i mis interpret what has been writing ...

Attachments:
mfd_meta.png
mfd_root.png


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

tjhb
10,094 post(s)
#16-Jan-18 04:18

OK Lionel, ça suffit, vraiment.

Lisez d'abord! Ensuite, posez vos questions en toute liberté.

Pour cette question, veuillez vous addresser ici.

Et oui, mon français écrit n'est pas terrible. Mais moi, je relis et corrige toujours ce que j'écris ici, quoique ce soit. A mon avis c'est important.

adamw


10,447 post(s)
#16-Jan-18 07:59

Tim, I think the link is wrong. :-)

Lionel, here is an example script that does what I talked about above:

// C#

 

class Script

{

 

static Manifold.Context Manifold;

static void Main()

{

  Manifold.Application app = Manifold.Application;

  using (Manifold.Database db = app.GetDatabaseRoot())

  {

    Manifold.PropertySet props = app.CreatePropertySetParse(db.Connection);

    app.Log("Path: " + props.GetProperty("Source"));

    app.OpenLog();

  }

}

 

}

For a new unsaved MAP file, this will print a blank string (you cannot get 'Project1', that's merely a placeholder which we will likely replace with something like '<new project>'). For a MAP file that has been opened from some location, it will print that location.

Hope this helps.

tjhb
10,094 post(s)
#16-Jan-18 08:38

Il me manque de générosité.

lionel

995 post(s)
#16-Jan-18 20:59
  • http://www.manifold.net/admin/community_terms.shtml
  • No "ad hominem" attacks. - An "ad hominem" attack is a criticism of a person instead of the person's words. If you find yourself commenting on a person instead of discussing the technical content of what he or she has written, you have probably crossed the line. For example, if someone posts technical commentary regarding use of a DBMS with Manifold and you reply with "That's all completely wrong because you do not understand how a DBMS works," that is disallowed because you are criticizing the person and are not discussing the technical problem. A constructive response would be one that discussed the relevant technical details of how the DBMS works and refrained from comments about the other person's understanding.

Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

Dimitri


7,413 post(s)
#17-Jan-18 07:14

You've missed two very important rules:

No self-appointed admins.- Polite, short reminders of these rules to other participants are OK, but please, no vigilante actions such as threadjacking or harrassing posts.

and

If you have chosen not to follow the advice to Read The Fine Manual do not complain a feature is "too hard" to use

Why no self-appointed admins? It's up to the admins to make a call, not users, especially since users often get it wrong. For example, you post about "ad hominem" attacks but it seems you are wrongly calling upon that rule in a situation where there has been no personal attack. If anybody has a problem with action in this forum, write to the admins.

Where, exactly, is a criticism of a person in this thread?

I have searched this thread and I see no attacks on a person, for example, "John Doe is a cretin..." I do see a reasonable reminder to read the documentation and a link to the documentation that should be read. In that reminder I see no personal attacks such as "you imbecile... read this documentation," or anything like that. I see a reminder to read first and to then ask questions. That is fair commentary between adults, not a personal attack.

Telling somebody to RTFM first, and to then ask whatever questions they like is perfectly OK. This forum requires participants to make an honest effort to first read the documentation. If somebody appears to be in the habit of not reading documentation, well, there can be many reasons for that, such as a language barrier or whatever, that are perfectly understandable and not a slur on the user. But still, that requirement to RTFM is still there, to make a legitimate effort to find the answer to a question in the documentation first. That rule is critical to keeping the signal to noise ratio high in this forum, and thus preserving the value of this forum for users.

As far as "tone" goes, we don't want this forum to degenerate into an arena where sensible people must walk on eggshells to avoid offending anyone. Please cut people some slack on "tone" given that posts are often issued quickly, we all want posts to be timely, and nobody wants folks to sit around editing posts out of fear they might be misinterpreted by somebody who is eager to discover slights where there are none. Basic civility is fine and if anybody is too hyper-sensitive to handle reasonably polite discussion between adults, then this forum is not for them.

In this case, I see a fair, businesslike comment between grown-ups, but I see no ad hominem attacks.

tjhb
10,094 post(s)
#17-Jan-18 08:25

Mais si, Lionel a raison, j’aurais dû me taire.

A ceci près: « Lisez d’abord, ensuite... en toute liberté ». Cela genau. Je le redis.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.