.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

0 REPLIES 0
Reply
Message 1 of 1
swissis
159 Views, 0 Replies

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

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.
0 REPLIES 0

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost