Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Where do I get the NXOpen.Gateway.dll file from?

Siemens Creator Siemens Creator
Siemens Creator

Hi Experts,

 

Any advice on where do I get the NXOpen.Gateway.dll file from?

Thanks..

 

Regards

Mukul

9 REPLIES 9

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Phenom Siemens Phenom
Siemens Phenom
Why do you think you need it?
山田
yamada

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Creator Siemens Creator
Siemens Creator

Customer needs to do some customizations and this DLL provides classes and interfaces for Gateway. Do you advise that they don't have to look for this DLL?

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Phenom Siemens Phenom
Siemens Phenom

Search your NX installation folders for files containing "gateway". There is no NXOpen.Gateway.dll. 

 

What "classes and interfaces" do you need, and why do you think they are located in a DLL with this name?


山田
yamada

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Experimenter Siemens Experimenter
Siemens Experimenter

Hi!

I would like to use the NXOpen.Gateway.ImageExportBuilder / ImageCaptureBuilder class.

 

I want to write a runtime behavior in NX MCD to trigger a ‚simulated camera‘ to export an image in bmp format in a certain perspective and range. To do so, I recorded a journal that gives me the NXOpen.Gateway.ImageExportBuilder command in VB (attached).

In MCD, I have to use C# for runtime behaviors. So I translated the journal into my C# class but visual studio gives me an error for the NXOpen.Gateway.ImageExportBuilder class. When trying to use the constructors for the classes, VS shows ‘ ImageExportBuilder() is inaccessible due to its protection level’.


That's why I was wondering where to get the NXOpen.Gateway.dll from?

Thanks for any help!

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Phenom Siemens Phenom
Siemens Phenom
The error message is because the class does not have a public constructor. Look for a static function that that you can call to create the builder. There will be a call to this function in the journal you recorded. If you can’t find this function, ask again.

There is no such thing as NXOpen.Gateway.dll.
山田
yamada

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Experimenter Siemens Experimenter
Siemens Experimenter

Thanks Yamada for your response!

I figured out that I should probably use the following code:

 

NXOpen.UI theUI;
NXOpen.Gateway.ImageExportBuilder imageExportBuilder;

 

theUI = NXOpen.UI.GetUI();

imageExportBuilder = theUI.CreateImageExportBuilder();

 

However, here, Visual Studio gives me the following error message

CS7069 C# Reference to type claims it is defined in 'mscorlib', but it could not be found

which again seems like I am not using the correct libraries? So far, I only have 

 

using System;
using NXOpen;

 

Thanks a lot for the help!

 

 

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Phenom Siemens Phenom
Siemens Phenom
You seem to be confusing references and “using” statements.

A reference to a library (or “assembly” in .NET jargon) makes the contents of that assembly available to your code.

A “using” statement merely lets you use abbreviated names, rather than full ones.

You’re probably not going to get much more help here unless you do a *much* better job of describing your problem. For example, how are we supposed to guess the cause of your error when you haven’t told us which line of code produced it ???
山田
yamada

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Experimenter Siemens Experimenter
Siemens Experimenter

I gave you the line of code that produced it:

theUI = NXOpen.UI.GetUI();

imageExportBuilder = theUI.CreateImageExportBuilder();

 

Sorry if that was not clear. 
I am attaching a screenshot here. 
Wanted to send the code earlier but forum does not allow me. 
Please let me know if that makes it more clear. 

Thanks for the help!

Re: Where do I get the NXOpen.Gateway.dll file from?

Siemens Phenom Siemens Phenom
Siemens Phenom
The error message says that the first problem is in line 30. So, looks like there is something wrong with your call to GetSession.

I don’t know if it makes a difference, but I would expect this code to be in your Main function. I don’t see what you’re trying to do by overriding the Start function.
山田
yamada