Questions tagged [.netlink]

Questions about integrating Mathematica and .Net using the .NET/Link functionality provided with Mathematica.

Filter by
Sorted by
Tagged with
2
votes
1answer
95 views

DefineDLLFunction returning array

I have an external "C" DLL function which returns a pointer to an byte array as well as the number of array elements (bytes) ...
3
votes
0answers
94 views

Use NETLink to call C# code that uses packages from nuget

I can successfully load and run methods of a static class I have written in c# using: ...
4
votes
0answers
36 views

Is it possible to load F# types using .NET/Link?

Suppose I define a type in F# such as: ...
0
votes
0answers
74 views

Calling FORTRAN function with fixed length Character

Following this example, I have tried to call subroutines written in FORTRAN which uses a fixed length character like "Character*255" (here 255 is an example). If the character length is given as ...
6
votes
1answer
101 views

How to use VBA types with UNDERLINE in it's name in NETLink?

When coding with VBA functions in NETLink, I need the enum reference. It's ok to get the ...
2
votes
1answer
49 views

How to make indepent linking workspace when using NETLink?

I've created two packages file as CompnentALink.m CompnentBLink.m the functions InstallNET[] and ...
5
votes
1answer
59 views

Problem with inserting a picture into Excel sheet in NETLink way

I'm using the NETLink to work with Excel object, there be differences to write code according to the ...
4
votes
1answer
49 views

How to show plot or graphics on Form or PictureBox in NETLink?

How to show the plot or graphics on the image property of a form or picturebox with NETLink? ...
9
votes
2answers
156 views

Problem with Excel operation in NETLink way

I'm using the NETLink package to build a Excel file and trying to fill it with some data as this: ...
1
vote
0answers
36 views

How to pass parameter to netlink objects

NETBlock[ InstallNET[]; excel=GetActiveCOMObject["Excel.Application"]; excel@ActiveWorkbook@SaveAs["blahblah.xlsb"] ]; How do i pass the fileformat ...
3
votes
1answer
54 views

Why some Graphics cannot be captured by MathLink in NETLink?

I'm trying test on calling mathematica function from .NET application by running demo application MathKernelApp.exe which could be located at ...
2
votes
1answer
70 views

How to convert an array in C# .net to ListPoint for calling ListPointPlot3D?

I have a two-dimensional array in C# (using .Netlink) double[][] rho The values of the array change dynamically as it represents some process in time. I have ...
7
votes
1answer
178 views

How can I copy a figure to the clipboard in SVG?

I frequently include plots in my emails. The easiest and most reliable way I have found is to just capture a part of the screen using greenshot (Windows) and paste into the message. Microsoft ...
1
vote
0answers
55 views
3
votes
1answer
113 views

How to control which version of Mathematica .NET/Link uses

I have three versions of Mathematica installed: 7.0.1, 11.0.1 and 11.1.1 but my test .NET/Link application will only use version 7. In Visual Studio I have referenced the ...
3
votes
0answers
110 views

FORTRAN complex number passing to Mathematica through NETLink

I used to use NETLink to call FORTRAN functions or subroutines compiled into a dll file. This works very well until now that I want to call a function which has complex arguments and returns a complex ...
1
vote
0answers
71 views

Optimization using NETLink failing [closed]

I define a function called f[x], which gives a numerical result interacting with an external free software called FEMM, using NETLink. This function works properly and the following codes give the ...
4
votes
1answer
119 views

How to find all package we can LoadNETType

After we Needs["NETLink`"] and InstallNET[];,we can use load many .net packages by ...
3
votes
1answer
92 views

How to create .NET “System.Windows.Clipboard”?

I have followed the instructions for creating a blank .Net form and it works. ...
1
vote
0answers
77 views

Using FindMinimum of a function imported via DefineDLLFunction

Mathematica newbie here, just used it today for the first time. So I've successfully "imported" a function from a dll I've built (in C++ with VS), using .NET/LINK and DefineDLLFunction and I've ...
0
votes
0answers
73 views

Creating a slideshow from MathKernel

I've recently started playing with the MathKernel using Wolfram.NETLink.dll and it works great in my C# .NET solution. To give some background, I had created a Mathematica notebook that generates ...
1
vote
1answer
69 views

Access to Read[] method on .Net object incorrectly flagged as syntax error, and changes needed to call NETLink functionality in a package.

Mathematica can access .net objects easily via NETLink. Works well to custom assemblies. However, I have run into a problem when trying to use Read() method on a ...
2
votes
0answers
64 views

NetLink with SsfPack (a .dll) for use in State Space Time Series

I have recently been doing work in the field of State Space Time Series. Mathematica does not have a lot of built in tools for working in this area. There is a well known package that is available, ...
1
vote
0answers
48 views

Instant detection of digital or analogue variation of a variable with Mathematica in Windows 8.1

I am using an assembly that contains two acquisition board (PCI-1742U-AE and PCIE-1816H-AE) and an external circuit, connected to boards. The computer uses Windows 8.1, and the communication is done ...
1
vote
0answers
722 views

Load function returning array or string from DLL created in Delphi

I'm trying to call a function from a 32-bit DLL created in Delphi. My (simplified) function is defined in Delphi like so: ...
1
vote
1answer
261 views

NETLink Problem with C# DLL

I am not getting the answers back from my DLL calls. Here are the simple C# functions. Not sure why I am not getting the correct answers. I can DLL import kernel32d.dll and can call getTickCount() ...
8
votes
1answer
221 views

A Simplistic C# (.NET) Reloader

Can one write a very straightforward C# reloader akin to this Java reloader, that enables Mathematica-like usage of functions from existing C# code in string format, in an easy and elegant fashion ...
7
votes
2answers
302 views

How to make a get image by a NETObject

This more then a .net question but I'm in Mathematica using.Suppose I want to get a image from my clipboard,so I make a function ...
4
votes
1answer
217 views

Specify Variable Size

Is there an easy way to specify the variable size and still use them as variables more specifically for the .NETLink? Something like the following I am thinking. ...
1
vote
0answers
45 views

Passing boolean parameters to a .NET Method using NETLink

According to the NETLink documentation, NETLink automatically handles type conversions from Mathematica to a .NET dll. One of the issues I have is that the .NET method I want to use expects a Boolean ...
0
votes
1answer
81 views

NETLink System.AccessViolationException when compiling #C with .NET 4.0 or higher

I have a program, which used NETlink to call Mathematica functions from C#. When we compile this program with .NET 4.0 or higher we get "An unhandled exception of type 'System....
0
votes
1answer
130 views

Transferring simple array of results through NETLink

Further to Todd Gayley's 2006 reply to the question .NET / hand over of variables, I am trying to fill an array of doubles with values via NET/Link. However, I am getting an exception. Can anyone ...
7
votes
2answers
342 views

Web Browsing Automation: how to expand all comments under a blog post?

I wish to expand all the comments under a LiveJournal post for the purposes of saving the complete thread of comments. According to LiveJournal's FAQ when a post gets more than 50 comments they are ...
2
votes
0answers
180 views

How to handle DLL dependencies between .NET dll and non-.NET dll's

I think my problem arises because I am successful with loading a .NET assembly, creating an instance and calling methods from a .NET dll. Certain methods, however, call methods from other non.NET ...
0
votes
0answers
203 views

Integrate fortran function into Mathematica

I was trying to use Fortran function in Mathematica. I was following mainly this answer . My Fortran code looks like this: ...
2
votes
1answer
83 views

Optimizing casting objects of a .NET List object

We are on the Wolfram Finance Platform using NET/Link to grab data from a C# API. We have a list of Core.Data.Securities.Options that we need to upcast to Core.Data.Securities.Security. Working with ...
3
votes
1answer
85 views

Replacing lambda expressions in LINQ queries through NET/Link

We have an IEnumerable Objects in C# that we want to import into the Wolfram Financial Platform. In the current C# API, we use LINQ queries to select from the Objects the specific Object that we need. ...
1
vote
0answers
159 views

Using .Net link with fortran DLL created by Intel Fortran [closed]

I am following unstable's wonderful answer on .NET and fortran. I can reproduce his result using gfortran without problem. But I want to use Intel Fortran, because gfortran generates slower code on ...
6
votes
0answers
148 views

Echo server with Mathematica

Consider the following scenario: two wireless notebooks communicating via ad hoc one computer (the client) send packets via TCP protocol without Mathematica the other one is an echo server ...
9
votes
1answer
208 views

Launch Front End from .NET MathKernel and return result to .NET

Is it possible to launch a front end and open a notebook from a .NETLink kernel and return a result from the notebook to .NET? In the code below "x" appears in the .NET textbox after 10 seconds but ...
1
vote
1answer
289 views

Using a pointer in NETLink

I am trying to use NETLink to control a camera exposure in our experiment. I have successfully connected to the camera and taken images. However, downloading it off the camera is trickier. The code ...
3
votes
0answers
191 views

VS c# NetLink - pictureBox - MathCommand

Has anyone experiance or a running example how to use within VS C# the NetLink.UI pictureBox to plot graphics, especially using the pictureBox - "MathCommand" I use the code example below which throw ...
2
votes
0answers
75 views

Call Remote Kernel from NETLink

Is it possible to run a remote kernel from NETLink in some way as suggested by the second method below: DoRemoteMathCommand? (...
2
votes
0answers
113 views

Sub-processes (like XML.exe, GZIP.exe) not ended properly

I have difficulties with running MathKernel.exe from .NET and sub-processes like XML.exe and GZIP.exe, which are not terminated properly. Sometimes even the MathKernel.exe task stays active and is ...
5
votes
1answer
228 views

Get .NET Link to work on Raspberry Pi

Is it possible to get the .NET Link working on Raspberry Pi? I understand that Linux and MacOS versions of Mathematica come with .NET Link running on Mono and now even possibly under new open-source ....
1
vote
1answer
444 views

Load a package and use it's functionality inside C#

I am trying to make a windows C# form which uses some functions that I wrote inside Mathematica. Suppose that we have the following package: ...
4
votes
1answer
959 views

Problem with .NET/Link - Unable to load DLL 'ml32i4.dll'

I have programmed this example for the last 6 years with various versions of Mathematica and .NET. This year I have moved to Version 10.0.2 and it doesn't work. I am using Visual Studio 12 for C#. My ...
8
votes
2answers
486 views

How can I create an object in NETLink from System.Collections.Generic.List

I am using NETLink and I am trying to construct the following .NET object List<string> list = new List<string>(); My first question is how can I load ...
1
vote
1answer
163 views

How to fill a Marshal buffer with whitespace using NETLink

Further to Todd Gayley's answer on string handling in a DLL function, I have the following code: ...
28
votes
2answers
5k views

How to programmatically extract mathematical formulas from Word with Mathematica 9?

I have a bunch of(1000+) Microsoft Word document in .Docx format. How can I programmatically extract the mathematical formulas from MS Word using Mathematica 9? This is what example looks like (or ...