.NET

Reply
Contributor
swissis
Posts: 19
Registered: ‎08-26-2004
Message 1 of 1 (43 Views)

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

43 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
Else
ps.Visible = True
End If
End Sub


If your still using VB6 then this is another reason why you should upgrade.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community