VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD Treeview

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
cadger
1465 Views, 4 Replies

AutoCAD Treeview

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!

4 REPLIES 4
Message 2 of 5
norman.yuan
in reply to: cadger

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

Message 3 of 5
cadger
in reply to: cadger

its seems that everything's 32-bit though..
Message 4 of 5
norman.yuan
in reply to: cadger

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

Message 5 of 5
cadger
in reply to: norman.yuan

thanks that did the trick

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost