Hi,
Just wondering if anybody else has used the lyr_isLocked function in Dcal for Delphi ?
I seem to be getting unpredictable results with it in the following logic:
With the above code I am getting ' (LOCKED)' appended to layer names pretty much at random.
Have I done something obviously wrong here or is the lyr_isLocked function buggy ? (I am using Dcad 20.01.00.04).
Thanks,
David H.
Just wondering if anybody else has used the lyr_isLocked function in Dcal for Delphi ?
I seem to be getting unpredictable results with it in the following logic:
Code: Select all
procedure TdhForm.FormCreate(Sender: TObject);
var
MyLyr : TLyr; //class which simply holds layer address so that it can be added to the list as an object
lyr : lyraddr;
lyrname : shortstring;
ndx : integer;
begin
lyr := lyr_first;
repeat
MyLyr := TLyr.Create(lyr);
getlyrname (lyr, lyrname);
if lyr_isLocked (lyr) then
lyrname := lyrname + ' (LOCKED)';
ndx := ListBox1.Items.AddObject(string(lyrname), MyLyr);
ListBox1.Selected[ndx] := LyrEqual (lyr, GetLyrCurr);
lyr := lyr_next(lyr);
until isnil (lyr);
end;
With the above code I am getting ' (LOCKED)' appended to layer names pretty much at random.
Have I done something obviously wrong here or is the lyr_isLocked function buggy ? (I am using Dcad 20.01.00.04).
Thanks,
David H.
David Henderson
dhSoftware - Add-on Macros for DataCAD
dhSoftware - Add-on Macros for DataCAD