how to delete an Entity
Moderators: SDS, support, admin
how to delete an Entity
hello
when i want to add an entity , i use the AddEntity Method,
but how to delete an entity to a draw ?
xavier
when i want to add an entity , i use the AddEntity Method,
but how to delete an entity to a draw ?
xavier
Re: how to delete an Entity
Hello xavier.
Unfortunately CADViewX current version doesn't include methods to delete entities or methods programmatically from a group. Because of this entities can be deleted with CADEditor tool in Pro version. The following code shows deleting all entities from a layer with index j:
Alexander.
Unfortunately CADViewX current version doesn't include methods to delete entities or methods programmatically from a group. Because of this entities can be deleted with CADEditor tool in Pro version. The following code shows deleting all entities from a layer with index j:
Code: Select all
CADViewLib.Group entities = CADViewX1.CADImage.Converter.get_Sections(CADViewLib.TxConvSection.csEntities);
CADViewLib.Group sel_entities = new CADViewLib.Group();
CADViewLib.Layer del_layer = CADViewX1.CADImage.Converter.get_Layers(j);
for (int i = 0; i < entities.Count; i++)
{
CADViewLib.Entity ent = entities.get_Entities(i);
if (ent.Layer == del_layer)
sel_entities.AddEntity(ent);
}
Editor = CADViewX1.GetCADEditor();
Editor.Select((CADViewLib.Entity)sel_entities);
Editor.Delete();
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: how to delete an Entity
Thank you
It works.
There's just one thing I do not understand.
The delete function is defined as "Function Delete () As Boolean '.
Delete deletes correctly and returns false. .... ???
It works.
There's just one thing I do not understand.
The delete function is defined as "Function Delete () As Boolean '.
Delete deletes correctly and returns false. .... ???
Re: how to delete an Entity
Hello.
Such results are not correct. Thank you for the remark. We have implemented minor changes in function body. So the returned value will depend on deleting results. The modification will be available with the next CADViewX version.
Alexander.
Such results are not correct. Thank you for the remark. We have implemented minor changes in function body. So the returned value will depend on deleting results. The modification will be available with the next CADViewX version.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support