Since you are using COM interop to interact with AutoCAD, I do not think you
can access Palette (built-in or your custom one) from your app, because the
Palette does not expose their interface via COM. However, you may be able to
expose your Palette made in Object ARX .NET API to COM (I haven't done
anything like that, someone may correct me if I am wrong).
As for your previous post, I guess that you did not load your Palette into
AutoCAD, that is, the Palette, as an ObjectARX object, must be loaded and
run in the same process as AutoCAD runs, not the process of your app
(remeber that you are using COM Automation, your app and AutoCAD run on
their own processes, the two communicate across the processes). You must use
"NETLOAD" command to load the ObjectARX .NET component into AutoCAD first.
Once the component is loaded, then this is another issue whether you can
control it (Show/Hide) via COM. Without "NETLOAD" it, there is no chance
your code will work.
One way I can think of to load the .NET dll automatically is add a list
statement in acad.lsp that call 'NETLOAD" command to load your .NET .DLL
whenever AutoCAD starts. Then you can concentrate on how to control
(Show/Hide) your Palette via COM, if you can make it possible.
IMO, automate AutoCAD is only useful when you need some AutoCAD's
functionality from your app but you do not need user to pay attention to
AutoCAD. If you need user to interact with AtuoCAD, automate Acad is not a
very good way. I'd rather have user run AutoCAD as the main program and do
something (your app does) from there. Is this could be your situation?
(because you want ot start Acad and show specific Palette to get user's
attention.)
wrote in message news:5230720@discussion.autodesk.com...
Hi again,
OK can i solve this problem by accessing the palatte that it is already
opened in the autocad app.
is there any function that retreives the autocads palette??
thanks in advance