Hello,
I've made a script to select ALL symbols in a layer, where atleast one of them is allready selected.
I'd like to extend it for other objects(plugin, line, text etc) but I fail at getting the names of the selected objects.
I know i'll have to change the selection part, but I just need to find a way to get the selected objects info
PROCEDURE SelectObjects;
VAR
OCount,i,j: INTEGER;
r, g, b :LONGINT;
OName,OName2,OName3,strinkie,test,selectie :STRING;
ONames : DYNARRAY[] of STRING;
FUNCTION SelectThem(h :HANDLE) :BOOLEAN;
BEGIN
OName := GetSymName(h);
IF OName ='' THEN BEGIN
OName := GetName(h); {can't get the object name ?}
END;
ONames:=OName;
i:=i+1;
END;
BEGIN
selectie:='Geselecteerde symbolen: ';
OCount:=NumSelectedObjects;
IF OCount<2 THEN OCount:=2;
i:=1;
ALLOCATE ONames [1..OCount];
ForEachObjectInLayer(SelectThem, 2, 0, 0);
SortArray(ONames,OCount,1);
DSelectAll;
FOR j:=1 TO OCount DO BEGIN
IF OName2<>ONames[j] THEN BEGIN
strinkie:=concat(ONames[j]);
OName2:=strinkie;
SelectObj((S=strinkie));
selectie:=concat(selectie,strinkie,', ');
END;
END;
AlrtDialog(selectie);
END;
RUN(SelectObjects);