ARX add-in wizard does not let me use treeview control

ARX add-in wizard does not let me use treeview control

Anonymous
Not applicable
721 Views
3 Replies
Message 1 of 4

ARX add-in wizard does not let me use treeview control

Anonymous
Not applicable

I am trying to migrate a VBA project to .Net. I created a new AutoCAD plug-in (from the installed template) and then added a Windows Form. I placed a TreeView control on the form, but VB won't recognize the reference to the control. When I try to Dim a variable as a TreeNode, it tells me "Type 'treenode' not defined. WTH?

 

If I start a new Windows Form project, I have no problem with this. In fact, I have a seperate VB.Net program I wrote with extensive use of the treeview control. It is only when using the wizard that this happens. The project seems to have all the same references, so I am stumped here.

 

Any ideas?

 

0 Likes
Accepted solutions (1)
722 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Accepted solution
Imports System.Windows.Forms

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load
        Dim treeNde As TreeNode
    End Sub
End Class
0 Likes
Message 3 of 4

norman.yuan
Mentor
Mentor

Since you have added a Win Form, so the System.Windows.Forms.dll must have already been refererenced by your project.

 

In the code file, you need

 

Either import the namespace:

 

Import System.Windows.Forms

 

Or use fully qualified class name:

 

Dim node As System.Windows.Forms.TreeNode

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 4 of 4

Anonymous
Not applicable

Thanks. That did it. I probably should have figured that out on my own. Smiley Surprised

 

 

0 Likes