AutoCAD's file selection dialog

AutoCAD's file selection dialog

Anonymous
Not applicable
638 Views
11 Replies
Message 1 of 12

AutoCAD's file selection dialog

Anonymous
Not applicable
I'm writing a routine (VBExpress05) for AutoCAD (08). I am trying to access AutoCAD's file selection dialog box (I'm currently using the Windows Common Dialog but it doesn't show the preview, it doesn't have the shortcuts that a user may have set up for AutoCAD, and it doesn't know the last directory browsed to...)

Does anyone know how to access it (in any version of VBA or VB)???

Thanks in advance,
Gary
0 Likes
639 Views
11 Replies
Replies (11)
Message 2 of 12

Ed__Jobe
Mentor
Mentor
If you are using VB.Net, are you not using the managed dll? Or is this a standalone vb app?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 12

Anonymous
Not applicable
Wow!!!
My world blew up on me for a little while, then I needed a vacation.

I'm building a standalone app in Visual Basic 2005 Express.
The app will be launched either from within AutoCAD, or directly from the desktop.
It's purpose is to navigate a detail library. If a user decides that they would like to insert a detail into a drawing they click a button.

If AutoCAD is not already running it launches it, then prompts the user to select a target file for the detail. I'm currently using the Windows common dialog for file selection, but would like to use the AutoCAD file dialog and I have no idea how to access it.

If you're still watching any help would be appreciated.
Gary
0 Likes
Message 4 of 12

Ed__Jobe
Mentor
Mentor
I don't see any need for this to be a standalone app. It will run faster in-process. Then you can use the managed wrappers to access the dialogs. I also suggest that you move this to the .NET ng.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 12

Anonymous
Not applicable
I'm not really sure how you would do it in .net, but what I did was to look through the library of the common dialog and use the commands necessary. Theres a complete .dll of a common dialog in system32. On my machine its COMDLG32.OCX, load that up as a reference and go to object viewer and look through that library. Sorry if this is no help, but I'm a self taught programmer
0 Likes
Message 6 of 12

jbooth
Advocate
Advocate
Visual Basic 2005 should have access to the standard file open/save dialogs via the System.Windows.Forms namespace.

I don't think Autodesk exposed their open dialog as an activex control.

If you are using the .NET managed arx wrappers your question is better answered in the .NET forums. That being said, try the Autodesk.AutoCAD.Windows.OpenFileDialog class.
0 Likes
Message 7 of 12

Anonymous
Not applicable
It's a standalone app to allow non AutoCAD users to browse, review, and print details from our DWF detail library. It also allows AutoCAD users the oppurtunity to actually insert the details into a drawing file.
But thanks for the thought.
0 Likes
Message 8 of 12

Anonymous
Not applicable
Also, about the .net group...
While there is a whole big .net interface and program, the free express versions are still just evolutions of VB, C++ and C#. All of the references that I have found in the .net group are way beyond me.
0 Likes
Message 9 of 12

Anonymous
Not applicable
Guess I'm gettin in over my head here. I thought that by accessing the autocad application that I would have access to the openfile dialog that they were using.
Thanks much for the pointer. When I can afford the time to dig deeper into the referencing I'll follow your lead, but until then I'll just use the common windows dialog.
Thanks much for the help.
G
0 Likes
Message 10 of 12

Ed__Jobe
Mentor
Mentor
While the language syntax is similar, everything under the hood has changed. If you are using the comm dlg control, that was written for VB6. You should use the system dialog as mentioned. Use the Imports statment with the namespace that was mentioned earlier and then you can dim a dialog variable and use it. Use the object browser and sample code from help.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 11 of 12

Anonymous
Not applicable
Well,
I've loaded every Autocad reference that I can find listed in the com tab of the references section and still can't find an openfiledialog class, so I guess that I'll give it up and settle for the openfiledialog class from system.windows.forms and call it good.

Thanks much for the attempt to get through my thick skull.

g
0 Likes
Message 12 of 12

Ed__Jobe
Mentor
Mentor
It isn't a COM lib. Its a managed lib, acmgd.dll and acdbmgd.dll. However, to use acad's managed lib's, you must use the NETLOAD command, hence the reason for my very first question. If you're using a standalone vb exe, you can't use the managed wrappers.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes