8 votes
Accepted

A Simplistic C# (.NET) Reloader

Yes it is possible to write such a code and I will present the code and sample usage below. The motivation for this question/answer is this Java reloader by Leonid Shifrin and I borrowed some code ...
RunnyKine's user avatar
  • 33k
8 votes
Accepted

Problem with Excel operation in NETLink way

In the Excel object model, the worksheet symbol Cells represents a property, not a method. In Visual Basic and other languages, many properties have a default ...
WReach's user avatar
  • 68.7k
7 votes
Accepted

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

Under Windows, this can be done with NETLink by modifying code published here. ...
Gustavo Delfino's user avatar
7 votes
Accepted

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

Quoting from the Underscores in .NET Names subsection within the Calling .NET from the Wolfram Language section of the NETLink Tutorial: .NET/Link maps underscores in type, method, property, and ...
WReach's user avatar
  • 68.7k
7 votes

Web Browser Screen Shot

There is now a built-in way to do this: WebImage["http://stackoverflow.com"] ...
user5601's user avatar
  • 3,613
7 votes

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

Here is one way to do it, using WebUnit: Needs["WebUnit`"]; InstallWebUnit[]; StartWebSession[]; OpenWebPage["http://suggestions.livejournal.com/825341.html"]; ...
Arnoud Buzing's user avatar
6 votes
Accepted

How to create .NET "System.Windows.Clipboard"?

First, we must load the PresentationCore assembly to make the type System.Windows.Clipboard available: ...
WReach's user avatar
  • 68.7k
5 votes
Accepted

How to make a get image by a NETObject

Done ...
yode's user avatar
  • 26.5k
5 votes

How to make a get image by a NETObject

I don't know much of .net and it probably shows, but at least I got something to work albeit very,very slowly. Your code (which I also turned into a bitmap on the clipboard using Mathematica's "Copy ...
Sjoerd C. de Vries's user avatar
5 votes

NETLink Problem with C# DLL

There are some minor errors that need to be corrected: The main problem is that C# methods must be called using the syntax obj@Method[args]. The C#-looking ...
WReach's user avatar
  • 68.7k
5 votes
Accepted

How to find all package we can LoadNETType

We can get a list of all .NET types that can be loaded using LoadNETType like this: ...
WReach's user avatar
  • 68.7k
5 votes

Problem with Excel operation in NETLink way

It works with code. Scan[(ws@Cells[#, #]@Value = #*100) &, Range@10] It seems that vars i in ...
Jerry's user avatar
  • 2,459
4 votes
Accepted

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

I do not know any C#, but this seems to be answered in the documentation. Since I am reading the local copy, not an online version, I cannot post links. Here are screenshots instead: Thus if you ...
Szabolcs's user avatar
  • 234k
4 votes
Accepted

Problem with inserting a picture into Excel sheet in NETLink way

The crux of the issue is that the symbol WorksheetClass.Pictures is a method, not a property. When using NETLink, methods must always be followed by an argument ...
WReach's user avatar
  • 68.7k
4 votes
Accepted

Does any know how to get the paths of current opened locations in file explorer?

If you are referring to the Windows File Explorer, then we can use NETLink and the Shell API to get a list of open windows: ...
WReach's user avatar
  • 68.7k
3 votes
Accepted

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

... What to do is to follow the .NET rule to make it. ...
Jerry's user avatar
  • 2,459
3 votes

A .NET exception occurred: System.IO.FileLoadException:Could not load file or assembly

As per MSDN: Note You may get a FileLoadException in a Windows Virtual PC application when you try to load a file from linked folders on the hosting computer. This error may also occur when you ...
Nitin's user avatar
  • 31
3 votes

Optimizing casting objects of a .NET List object

After thinking about it for a while, I realized that the best, least messy, and fastest solution was to create a helper library for situations like this. ...
user1981756's user avatar
3 votes
Accepted

Passing an image to Kernel via NETLink

I have found through a lot of iterations that the easiest and most reliable way of doing this is to pass the images using Base64 strings. I have included example functions for sending and retrieving ...
Vredesbyrd's user avatar
3 votes
Accepted

How to pass the second parameter to COM object in NETLink?

As Microsoft noted on the Type.Missing Page: The following code example shows the use of the Missing field to invoke a method with its default arguments. To use ...
Ben Izd's user avatar
  • 9,169
2 votes
Accepted

Replacing lambda expressions in LINQ queries through NET/Link

A solution to this is to convert the .Net collection into a Wolfram List and then use Select. ...
Edmund's user avatar
  • 42k
2 votes

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

@WolframFan The answer is great, help me understanding the XML document format. Here is my codes. Part 1 If linear formulas wanted, try this ...
Jerry's user avatar
  • 2,459
2 votes

MathLink error while calling a custom Mathematica function - MLGet out of sequence

testFunc[] needs to be defined prior to being called. I don't use .NETLink, so I can't guarantee if the following will work, but try ...
obsolesced's user avatar
2 votes

Formatting Excel Borders with .Net

I suggest write code formatting borders as following avoiding using the Enum values directly. ...
Jerry's user avatar
  • 2,459
2 votes

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

As pointed out by @Szabolcs, the syntax highlighting in the editors is misleading and can be ignored. To answer the question how to get the .Net assembly methods to run in a package, prefix ...
Richard Scott's user avatar
2 votes
Accepted

Specify Variable Size

Don't know how close this is to what you are after: ...
Kuba's user avatar
  • 137k
2 votes

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

AccessViolationException is explicit : somehow your program is accessing memory that it doesn't have right to access (didn't allocate for ex). Since it' s in the another library, you're probably ...
code7amza's user avatar
2 votes

Why some Graphics cannot be captured by MathLink in NETLink?

I've found the problem of the demo .net project. some lines' codes should be modified properlly to enable the kernel sending result. ...
Jerry's user avatar
  • 2,459
2 votes
Accepted

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

Perhaps someone will come up with something more concise. ...
Chris Degnen's user avatar
  • 30.8k
2 votes
Accepted

Can I distribute Wolfram.NETLink.dll with an open-source project?

To follow up on this: WRI did respond to me and had no issue with redistribution of the MathLink dll as a NuGet package, and are planning on creating their own package in the future. For now, I'm ...
Joe Iaquinto's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible