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

Heavy DwgIn DWGOuting

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
341 Views, 3 Replies

Heavy DwgIn DWGOuting

Hello.
Sorry if unclear, but I try describe a problem.
When I copy, move my custom entity or grip edit it a heavy dwginning dwgoutting happens.
With every small mouse move my entity gets copied through dwgout, then dwginning in new location, worlddrawed, then again dwgout, old copy erases and dwginning in new position.

TransformBy works only at a time you release mouse buttons.
My dwgIn, dwgout funcs making a lot of calculation (I recreate my acad-native geometry representing entities), but 99% data when MOVE or GRIPEDIT commands remains untouched

How I can make things right way?
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous


What you're seeing is the clone process in
action.  For every mouse move, the entity is cloned, the clone is
transformed, and the clone is used to display the drag image at that cursor
location.  In some situations (such as I think the MOVE
command) this won't happen because the drag graphics can be cached and a
simple translation applied.

 

The only way that I know of to copletely avoid the
cloning is to override the cloneMeForDragging() method in your custom
entity and have it return false.  Then your "original" entity will be used
for all drag graphics.  This means that transformBy() will be called on
your original entity for each cursor sample taken, so your entity code will need
to know that from the time cloneMeForDragging() is called until the time that
the entity's dragStatus() method is called with kDragEnd or kDragAbort, any
transformation information is for the drag and should NOT be applied
permanently.  Then, after dragStatus() is called with kDragEnd, you should
get one last transformBy() call that is the transformation that should be
applied permanently.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hello.
Sorry if unclear, but I try describe a problem. When I copy, move my custom
entity or grip edit it a heavy dwginning dwgoutting happens. With every small
mouse move my entity gets copied through dwgout, then dwginning in new
location, worlddrawed, then again dwgout, old copy erases and dwginning in new
position. TransformBy works only at a time you release mouse buttons. My
dwgIn, dwgout funcs making a lot of calculation (I recreate my acad-native
geometry representing entities), but 99% data when MOVE or GRIPEDIT commands
remains untouched How I can make things right way?
Message 3 of 4
Anonymous
in reply to: Anonymous

It's only dragging or grip editing too?
In grip editing this process (cloning) works too.
Message 4 of 4
Anonymous
in reply to: Anonymous


I think it's both, but it's been over ten years
since I implemented the cloneMeForDragging() mechanism, so I can't remember
for sure, and it may have changed since then anyway.  Try it and see. 
:)


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
It's
only dragging or grip editing too? In grip editing this process (cloning)
works too.

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

Post to forums  

Autodesk Design & Make Report

”Boost