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

Using ads_commands inside a Reactor???

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
452 Views, 5 Replies

Using ads_commands inside a Reactor???

Hello,

I know that these ads_commands do not work inside reactors, that's what the
ObjectArx Developer Guide tells me.
But unfortunately it don't tells me what to use instead!!!

Is there some internal workaround for this "official bug"??? Or do I have to
re-programm all these commands from scratch??? 😞

Thanx!

cya Jan
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Jan,

This is not an official bug!
Calling ads_command could be a complete nighmare for you if it where
allowed.

This a no-no as you could nest commands more than 3 levels deep
and also you could create re-cursive calls.

You can try sendstringtoExecute:
E.G.
acDocManager->sendStringToExecute(acDocManager->curDocument(), "-INSERT\n",
true, false, false);


Regards Gary.
www.ltfactory.com



"Jan Rembold" wrote in message
news:3DF020B9D1A4EA2DC61E68C42F9DA4F9@in.WebX.maYIadrTaRb...
> Hello,
>
> I know that these ads_commands do not work inside reactors, that's what
the
> ObjectArx Developer Guide tells me.
> But unfortunately it don't tells me what to use instead!!!
>
> Is there some internal workaround for this "official bug"??? Or do I have
to
> re-programm all these commands from scratch??? 😞
>
> Thanx!
>
> cya Jan
>
>
Message 3 of 6
Anonymous
in reply to: Anonymous

"Jan Rembold" wrote in message
news:3DF020B9D1A4EA2DC61E68C42F9DA4F9@in.WebX.maYIadrTaRb...
> Hello,
>
> I know that these ads_commands do not work inside reactors, that's what
the
> ObjectArx Developer Guide tells me.
> But unfortunately it don't tells me what to use instead!!!

What do you want to do? I'm sure you can (and should) do it with plain
c++/arx. If you get more specific, I'm sure this group will find a solution
for it.

>
> Is there some internal workaround for this "official bug"??? Or do I have
to
> re-programm all these commands from scratch??? 😞
>
> Thanx!
>
> cya Jan
>
>
Message 4 of 6
Anonymous
in reply to: Anonymous

Hi,

First, thanx to Gary for your quick help!

But know a little bit more specific:

I use the LayoutReactor to catch the Layout-Tab messages
(rename/delete/switch).
There are also Buttons that activate nearly the same functions.
The "normal way" was to use the Buttons to switch and delete the Layouts and
so it was no problem to use ads_commands() to set the Viewports off.

Now I have created a few Layouts, whose VIEWS should all be OFF if they are
not currently in use.
I wrote a test_function that sets them all manually OFF (
Viewport->setOff() ) And they are OFF afterwards.
But when I switch back to another layout its Viewport is still ON. The only
Layout it works on is the current active Layout.

Is there something inside the BlockTableRecord or the ACAD_LAYOUT Dict. I
have to set active before changing the VIEW OFF???? Or how can I force all
the Records to take these effects? Is there some kind of
UpdateDict-Function?
There should be a Background-Solution for that. (Although it works to step
from Layout to Layout and use the "sendStringToExecute()" function.)

cya Jan
Message 5 of 6
Anonymous
in reply to: Anonymous

Due to the way viewports are implemented, only viewports in the currently
active layout can be turned on/off. If you call setOff() on an AcDbViewport
that's not in the current layout, you should get a return ErrorStatus of
eNotInPaperspace letting you know that it can't be turned off.

"Jan Rembold" wrote in message
news:062FC3B268BBDAD97B4D33776284D769@in.WebX.maYIadrTaRb...
> Hi,
>
> First, thanx to Gary for your quick help!
>
> But know a little bit more specific:
>
> I use the LayoutReactor to catch the Layout-Tab messages
> (rename/delete/switch).
> There are also Buttons that activate nearly the same functions.
> The "normal way" was to use the Buttons to switch and delete the Layouts
and
> so it was no problem to use ads_commands() to set the Viewports off.
>
> Now I have created a few Layouts, whose VIEWS should all be OFF if they
are
> not currently in use.
> I wrote a test_function that sets them all manually OFF (
> Viewport->setOff() ) And they are OFF afterwards.
> But when I switch back to another layout its Viewport is still ON. The
only
> Layout it works on is the current active Layout.
>
> Is there something inside the BlockTableRecord or the ACAD_LAYOUT Dict. I
> have to set active before changing the VIEW OFF???? Or how can I force all
> the Records to take these effects? Is there some kind of
> UpdateDict-Function?
> There should be a Background-Solution for that. (Although it works to step
> from Layout to Layout and use the "sendStringToExecute()" function.)
>
> cya Jan
>
>
Message 6 of 6
Anonymous
in reply to: Anonymous

That was the answer I expected....
Thanx !

cya jan

"Art Cooney" schrieb im Newsbeitrag
news:C53905C65EFF304F897589A30BB6804E@in.WebX.maYIadrTaRb...
> Due to the way viewports are implemented, only viewports in the currently
> active layout can be turned on/off. If you call setOff() on an
AcDbViewport
> that's not in the current layout, you should get a return ErrorStatus of
> eNotInPaperspace letting you know that it can't be turned off.
>
> "Jan Rembold" wrote in message
> news:062FC3B268BBDAD97B4D33776284D769@in.WebX.maYIadrTaRb...
> > Hi,
> >
> > First, thanx to Gary for your quick help!
> >
> > But know a little bit more specific:
> >
> > I use the LayoutReactor to catch the Layout-Tab messages
> > (rename/delete/switch).
> > There are also Buttons that activate nearly the same functions.
> > The "normal way" was to use the Buttons to switch and delete the Layouts
> and
> > so it was no problem to use ads_commands() to set the Viewports off.
> >
> > Now I have created a few Layouts, whose VIEWS should all be OFF if they
> are
> > not currently in use.
> > I wrote a test_function that sets them all manually OFF (
> > Viewport->setOff() ) And they are OFF afterwards.
> > But when I switch back to another layout its Viewport is still ON. The
> only
> > Layout it works on is the current active Layout.
> >
> > Is there something inside the BlockTableRecord or the ACAD_LAYOUT Dict.
I
> > have to set active before changing the VIEW OFF???? Or how can I force
all
> > the Records to take these effects? Is there some kind of
> > UpdateDict-Function?
> > There should be a Background-Solution for that. (Although it works to
step
> > from Layout to Layout and use the "sendStringToExecute()" function.)
> >
> > cya Jan
> >
> >
>
>

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

Post to forums  

Autodesk Design & Make Report

”Boost