First, I am developing with the following system environment.
- ObjectARX 2011
- AutoCAD 2010
- C# with VS 2008
I am making a custom command that opens a open file dialog to prompt the user a dwg file.
And the programmatically(automatically) insert another dwg file to the opened map.
So what I tried to find a method to open a open file dialog, but couldn't find it.
So next I tried to execute "OPEN" command programmatically. The following code is what I tried...
and changing the second parameter to true...
When I run the custom command, nothing happends.
How could I do this?
p.s. After opening a file, I want to insert ("INSERT" command) another drawing onto it. How could I achieve this?
Solved! Go to Solution.
Have a look into Autodesk.AutoCAD.Windows.OpenFileDialog for selecting files.
Unfortunately I don't understand the second part of your question.
Thank you a lot~! =)
The second part means...
When you execute "INSERT" command in AutoCAD, you (the user) have to choose a file to insert and set the base point, scale, rotation.
So basically I want to do these steps automatically.
have you searched for how to insert blockreferences within this forum?
- alfred -
Have a look for Tony Tanzillo's commandline class which basically replaces SendCommand with a much better version where you can put in PAUSE like in VisualLisp commands.
As I'm currently working on my photo-laptop I don't have it handy but you should find it within this forum. Otherwise send me an email and I'll flip it through to you once I'm back in the office (next week Tuesday).
Thank you a lot~!
"Tony Tanzillo's commandline class" works great for me.
Plus, it was easy to convert VB to C# using free online converter. =)
Thank you again.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register