Posts: 19
Registered: ‎08-26-2004
Message 1 of 1 (47 Views)

About article: Re: Is there a way of doing docking dialog box with VB/VBA?

47 Views, 0 Replies
06-06-2006 04:22 AM
I tried this example that Mikko posted in VB group, everything loads fine but i get a "unknown command" in autocad after loading it by netload.
Can you post me an VB example that works?

If your using VB.NET:

1. Start a class library project
2. Set references to acdbmgd.dll and acmgd.dll
3. Add a user control (in my code its called dockingFrm)
4. Add whatever buttons, textboxes, labels, etc.... and code
5. Build it
6. Start AutoCAD. Type NETLOAD. Browse to you compiled dll and select it
7. Type whatever your command it called. (in this code its Docker)

Here is a easy example of a user control code.

Imports Autodesk.AutoCAD.Runtime

Dim ps As Autodesk.AutoCAD.Windows.PaletteSet

Public Sub Docker()
If ps Is Nothing Then
ps = New Autodesk.AutoCAD.Windows.PaletteSet("Docker")
Dim myForm As dockingFrm = New dockingFrm
ps.Add("Docker", myForm)
ps.MinimumSize = New System.Drawing.Size(120, 200)
ps.Visible = True
ps.Visible = True
End If
End Sub

If your still using VB6 then this is another reason why you should upgrade.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.