Hi,
Classic DCAL defined GridOrgX and GridOrgy processing variables. You could assign vales to these to change the grid origin on the current layer.
I have not found any direct equivalents to these in D4D, but the layer record contains a GridOrg field, so I assumed that assigning a value to this field would update the grid origin for the appropriate layer. But this does not appear to be the case.
I have the following code:
The above code is updating the gridorg field correctly, but the grid origin is not being updated (e.g. the snap origin is not being changed, regening the display (U) is not redisplaying the grids with the new origin).
Does anybody know what is the correct method to change the grid origin in DCAL for Delphi ?
Thanks,
David H
Classic DCAL defined GridOrgX and GridOrgy processing variables. You could assign vales to these to change the grid origin on the current layer.
I have not found any direct equivalents to these in D4D, but the layer record contains a GridOrg field, so I assumed that assigning a value to this field would update the grid origin for the appropriate layer. But this does not appear to be the case.
I have the following code:
Code: Select all
if l.getp.Result = res_normal then begin
if lyr_get (getlyrcurr, rlyr) then
rlyr.gridorg := l.getp.curs;
The above code is updating the gridorg field correctly, but the grid origin is not being updated (e.g. the snap origin is not being changed, regening the display (U) is not redisplaying the grids with the new origin).
Does anybody know what is the correct method to change the grid origin in DCAL for Delphi ?
Thanks,
David H
David Henderson
dhSoftware - Add-on Macros for DataCAD
dhSoftware - Add-on Macros for DataCAD