cancel
Showing results for 
Search instead for 
Did you mean: 

Block UI set list

Creator
Creator

Hi,

 

I am trying to make an array (list with columns) with data from the user in VB.NET.

More specific the user needs to 

- define a name

- choose from a list of strings

- enter an amount

 

I couldn't find an array function in the block UI styler so I went on an tried with the 'set list'.
However I have very limited knowledge and don't succeed in getting data into the list.

 

Can anybody give me an full example on how to use the set list block or give me an alternative for this purpose (in VB.NET).

I also need to read the data from the list afterwards in order to write it into an Excel spreadsheet.

So an example to read all the data from the list would be appreciated as well.

 

Thanks in advance,

Laurens

Student at University of Gent

6 REPLIES

Re: Block UI set list

Phenom
Phenom

I don't have a fully coded example, but there are a number on the Solution Centre. A quick search showed this one looks to be commented most:

Sample NX Open .NET C# program : set face names as specified using Set List block

Or on Solution Centre search for nx_api4346 or for all example search for SetList and filter for nx_api.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Block UI set list

Creator
Creator

Thank you for the help.

 

I am trying to understand the example, but I forgot to mention I should use VB.NET.

Does this differ a lot to C#?

And if so, is it possible to use this C# code in combination with the rest of my VB.NET program, or will it not compile?

 

Thanks,

Laurens

Re: Block UI set list

Phenom
Phenom

I'm afraid I use Java rather than VB or C# (despite what it says in my signature Smiley Wink)so I can't help other than to say that the calls to NXOpen objects should be fairly similar between VB and C#. As for the format of the rest of the language, I would have thought that it would be fairly easy to interpret how it works and convert to VB.

As for running VB code and C# code together it might be possible if you compile them into libraries and call one from the other, but I'm sure it would be simpler to convert the code from C# to VB.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Block UI set list

Genius
Genius

There are some tools that convert c# source code to vb.net source code or vice versa (e.g. http://www.developerfusion.com/tools/convert/csharp-to-vb/)

 

Regards

Jan

Jan Böttcher

Re: Block UI set list

Creator
Creator

Thank you for your help!
I managed to convert it to VB based on the example you gave me.

Re: Block UI set list

Creator
Creator
Thank you for showing me this tool.
Although it couldn't translate what I wanted, I might use it in the future.