AutoCAD Treeview

AutoCAD Treeview

Anonymous
Not applicable
1,851 Views
4 Replies
Message 1 of 5

AutoCAD Treeview

Anonymous
Not applicable

Hi,

 

I created an excel treeview control on a form in excel using Dim x(50) as Node and am trying to replicate it in AutoCAD vba.  However, it's saying that Node is a user defined type though.  How can I get a Node type to show up?  Am I missing a reference or something?

 

Thanks!

0 Likes
Accepted solutions (1)
1,852 Views
4 Replies
Replies (4)
Message 2 of 5

norman.yuan
Mentor
Mentor

Neither Excel's VBA, nor AutoCAD VBA has a TreeView control built-in.

 

You are probably talking about the TreeView control from MSCOMCTL.OCX. And obviously you are using AutoCAD 2014/15 64-bit, which has 64-bit VBA. If so, you cannot use anything from MSCOMCTL.OCX, because it is 32-bit component. I do not think you can find a 64-bit equivalent Treeveiew component. As matter of fact, there are very few 64-bit COM controls you can choose from, except for the very basic ones coming with the VBA.

 

If your project needs fine UI elements, 64-bit VBA will not help at all. You either go back to Acad2013 64-bit (its VBA is still 32-bit), or use 32-bit AutoCAD2014/15. Or you just stop investing more effort on AutoCAD VBA. 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 5

Anonymous
Not applicable
its seems that everything's 32-bit though..
0 Likes
Message 4 of 5

norman.yuan
Mentor
Mentor
Accepted solution

if you are running 32-bit AutoCAD, what OS do you use? Win7/8 32bit or Win7/8 64-bit?

 

If you click VBA IDE menu  Tools->References..., you'd likely find that some referenced library (Microsoft Common Controls (6,0), most possibly) is flagged as missing.

 

If it is Win 7/8 64bit, the MSCOMCTL.OCX is likely not registered. IN the "Refernces" dialog box, you can click "Browse" to select MSCOMSTL.OCX file, which will register it. After that you should be fine.

 

Again, if you are using AutoCAd 2014/15 64-bit, then there is no solution.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 5 of 5

Anonymous
Not applicable
thanks that did the trick
0 Likes