VS:DeleteObjs

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix


Description

Procedure DeleteObjs deletes all selected objects on the active layer. Using this procedure when the layer display mode is Show/Snap/Modify will cause selected objects on any visible layer will be deleted.
PROCEDURE DeleteObjs;
def vs.DeleteObjs():
    return None

Example

VectorScript

PROCEDURE Example;
VAR
red, green, blue, color :LONGINT;
criteria :STRING;
BEGIN
red := 65535;
green := 0;
blue := 0;
RGBToColorIndex(red, green, blue, color);
Rect(0, 0, 1, 1);
SetPenFore(LNewObj, color);
DSelectAll;
criteria := Concat('(INSYMBOL & INVIEWPORT & (PF=', color, '))');
SelectObj(criteria);
Message(criteria);
DeleteObjs;
END;
RUN(Example);

Python

def Example():
	red = 65535
	green = 0
	blue = 0
	color = vs.RGBToColorIndex(red, green, blue)
	vs.Rect(0, 0, 1, 1)
	vs.SetPenFore(vs.LNewObj(), color)
	vs.DSelectAll()
	criteria = vs.Concat('(INSYMBOL & INVIEWPORT & (PF=', color, '))')
	vs.SelectObj(criteria)
	vs.Message(criteria)
	vs.DeleteObjs()
Example()

Version

Availability: from All Versions
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox