Transparent commands

Transparent commands

Anonymous
Not applicable
628 Views
3 Replies
Message 1 of 4

Transparent commands

Anonymous
Not applicable
For AutoCAD 2000, 2000i and 2002 environment it is impossible to use the transparent toolbar or menu command (Zoom Window, Snap to the endpoint, ...)when calling any user interface method (GetPoint, GetDistance, selectOnScreen, ...)with ActiveX technology.
AutoCAD starts the transparent command itself but cancels
the ActiveX call. The result is the same from any ActiveX enabled programs done in Visual Basic 6.0, Visual C++ 6.0, or VBA in AutoCAD. I thought a way to fix this could be an ObjectARX program enabled for ActiveX with all required user
interface functions. Invoking the custom functions just from AutoCAD worked fine but invoking them with ActiveX was giving the same results.
Is there a way around this?
I know that AutoCAD R14 does not cause these problems.
Why is 2002 different?

Ian Whitworth
Slovakia
0 Likes
629 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
The problem is not directly related to the ActiveX APIs or
their user input functions, it is caused by the fact that
the code that calls those functions is executing in the
application context.

If you execute the same code from the document context, the
problem doesn't occur. For example, if you start a VBA macro
that gets input, using this (entered into the Command line):

(vla-runmacro (vlax-get-acad-object) "YourMacro")

Then calls to GetXxxxx() functions made in "YourMacro" will
not be cancelled when you use Zoom or Pan from the toolbar.


"asap" wrote in message news:[email protected]...
> For AutoCAD 2000, 2000i and 2002 environment it is impossible to use the
transparent toolbar or menu command (Zoom Window, Snap to the endpoint,
...)when calling any user interface method (GetPoint, GetDistance,
selectOnScreen, ...)with ActiveX technology.
> AutoCAD starts the transparent command itself but cancels
> the ActiveX call. The result is the same from any ActiveX enabled programs
done in Visual Basic 6.0, Visual C++ 6.0, or VBA in AutoCAD. I thought a way
to fix this could be an ObjectARX program enabled for ActiveX with all
required user
> interface functions. Invoking the custom functions just from AutoCAD
worked fine but invoking them with ActiveX was giving the same results.
> Is there a way around this?
> I know that AutoCAD R14 does not cause these problems.
> Why is 2002 different?
> Ian Whitworth
> Slovakia
>
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thanks Tony I will try it
Ian
0 Likes
Message 4 of 4

Anonymous
Not applicable
I have now tried the example (vla-runmacro (vlax-get-acad-object) "MyMacro") and it works but it does not really help me too much. I have created a stand alone executable program that works interactively with AutoCAD. It was a lot of work (about 5 moths) and the program works fine with AutoCAD R14. I am sort of on a hold for the new AutoCAD releases because of this transperent command problem.
It is possible to do it from the command line as you suggested with the SendCommand method and then waiting for a response through the Application events. It just seems to me as a very inefficient way with a lot of unexpected errors possible that can not be immediately rectified. This combined with the fact that returned values are not readily available makes the suggested solution rather impracticable in this case. If I had known this before I would have programmed the whole thing as an ObjectARX application.
Does any one know of an easier and more direct (i.e. controllable) way to fix this problem in this case? Surely I'm not the first one to come up against this problem.
Is it going to stay this way for other AutoCAD releases?
I.Whitworth (Slovakia)
0 Likes