Custom objects

Custom objects

Anonymous
Not applicable
596 Views
5 Replies
Message 1 of 6

Custom objects

Anonymous
Not applicable
And another problem is there any method of AcDbObject that has to be predefined to redraw the visualization of the custom object when changing one of its parameters, because the object accepts the changes but there is no change in its visualization.

Thanks again!!!
0 Likes
597 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
> And another problem is there any method of AcDbObject that
> has to be predefined to redraw the visualization of the custom
> object when changing one of its parameters, because the
> object accepts the changes but there is no change in its
> visualization.

Any member function that changes the object's appearance should first call
AcDbObject::assertWriteEnabled(). 🙂
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com
0 Likes
Message 3 of 6

Anonymous
Not applicable
AcDbObject::assertWriteEnabled(). 🙂
YES I know this but I need when changing for example the start point of an entity the entity to modify its graphics.
0 Likes
Message 4 of 6

Anonymous
Not applicable
> YES I know this but I need when changing for example the
> start point of an entity the entity to modify its graphics.

Calling assertWriteEnabled() marks the entity as modified, so that AutoCAD
knows to regenerate its graphics. 🙂
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com
0 Likes
Message 5 of 6

Anonymous
Not applicable
yeap all is like you said but the real life is not like this the grip points return their previous position after UNDO for example but the graphics does not.
0 Likes
Message 6 of 6

Anonymous
Not applicable
I use the following code to update the display
while modifying a custom entity in a dialog.

 


size=2> m_pMayersFlag->recordGraphicsModified();
 m_pMayersFlag->downgradeOpen();
 m_pMayersFlag->draw();
 acedGetAcadDwgView()->Invalidate();
 Acad::ErrorStatus
es;
 es =
acDocManager->lockDocument(acDocManager->curDocument(),AcAp::kWrite,NULL,NULL,true);
 es
= m_pMayersFlag->upgradeOpen();
0 Likes