# GenApiGrid ActiveX C#

**URL:** <https://forum.commonvisionblox.com/t/genapigrid-activex-c/1822>\
**Category:** Programming Questions\
**Created:** [November 3, 2022, 10:48am UTC](https://forum.commonvisionblox.com/t/genapigrid-activex-c/1822 "2022-11-03T10:48:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bviaron](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/bviaron/32/179_2.png) [@Bviaron](https://forum.commonvisionblox.com/u/Bviaron)\
**Post date:** [November 3, 2022, 10:48am UTC](https://forum.commonvisionblox.com/t/genapigrid-activex-c/1822/1 "2022-11-03T10:48:39Z")

</div>

Hi guys,

I have a question for you about the use of ActiveX with CVB.  
With the ActiveX GenApiGrid, we can set/get camera parameters graphically but if we want to send a command, we have to get the « NodeMap » first.

The classic way of how to do seems to be like this :

[https://help.commonvisionblox.com/NextGen/14.0/md\_theory\_of\_operation\_image\_manager\_\_image\_manager.html#imgmchmtopic98](https://help.commonvisionblox.com/NextGen/14.0/md_theory_of_operation_image_manager__image_manager.html#imgmchmtopic98)

But this is not the ActiveX itself which retrieve the NodeMapHandle but a dll of the driver.

Do you know if it’s possible to get the NodeMapHandle directly from the GenApiGrid ActiveX ?  
(in order to have a full ActiveX use)

Thanks,  
Benjamin

---

<div class="post-metadata">

**Author:** ![Chris](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/chris/32/1154_2.png) [@Chris](https://forum.commonvisionblox.com/u/Chris)\
**Post date:** [November 3, 2022, 12:08pm UTC](https://forum.commonvisionblox.com/t/genapigrid-activex-c/1822/2 "2022-11-03T12:08:10Z")

</div>

Hi @Bviaron ,

this should do the trick:

```nohighlight
if (Driver.INodeMapHandle.CanNodeMapHandle((Cvb.Image.IMG)CvbImage))
{
     Driver.INodeMapHandle.NMHGetNodeMap((Cvb.Image.IMG)CvbImage, out _nodeMap);
}

```

with CvbImage being (int)axCVimage.Image

---

<div class="post-metadata">

**Author:** ![Bviaron](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/bviaron/32/179_2.png) [@Bviaron](https://forum.commonvisionblox.com/u/Bviaron)\
**Post date:** [November 3, 2022, 4:49pm UTC](https://forum.commonvisionblox.com/t/genapigrid-activex-c/1822/3 "2022-11-03T16:49:06Z")

</div>

Hi @Chris ,

The code you sent me is the same than the weblink I sent you.

Is the function “Driver.INodeMapHandle.NMHGetNodeMap” is the only one to get the nodeMap ?  
No way to get the nodeMap directly from an ActiveX ?

Thanks,  
Benjamin

---

<div class="post-metadata">

**Author:** ![Chris](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/chris/32/1154_2.png) [@Chris](https://forum.commonvisionblox.com/u/Chris)\
**Post date:** [November 4, 2022, 7:04am UTC](https://forum.commonvisionblox.com/t/genapigrid-activex-c/1822/4 "2022-11-04T07:04:31Z")

</div>

Hi @Bviaron ,

sorry I honestly did not have a look into the link.  
As far as I am aware this is the only way, yes.

I dont understand the second sentence… you get the nodemap from the image that is on the ActiveX. So thats as much getting something from an AX as possible 😛

The whole AX related functionality and the “older” C# wrappers are pretty unhandy compared to the latest .NET wrappers, but I assume you want to modify an existing application which is why you are working with the AX controls.
