S
SS
Guest
I have a code which would delete some shapes in the layout view if
they a "certain" property attached to it.
I use dbDeleteObject to delete them . However dbDeleteObject deletes
some child objects while deleting parent objects.
This causes the code to error out (as it tries to delete already
deleted objects).
I therefore introduced a check to see if the object exists before
deleting.
This is how I do it.
if(obj the
printf("the obj is %L\n" obj)
if(dbGetPropByName(obj "placed") != nil then
dbDeleteObject(obj)
)
dbSave(cvId)
)
Howver it prints the object ID (using the print statement) but errors
out after that saying the object does'nt exist.
Wyy is this happenning ?
-SS
they a "certain" property attached to it.
I use dbDeleteObject to delete them . However dbDeleteObject deletes
some child objects while deleting parent objects.
This causes the code to error out (as it tries to delete already
deleted objects).
I therefore introduced a check to see if the object exists before
deleting.
This is how I do it.
if(obj the
printf("the obj is %L\n" obj)
if(dbGetPropByName(obj "placed") != nil then
dbDeleteObject(obj)
)
dbSave(cvId)
)
Howver it prints the object ID (using the print statement) but errors
out after that saying the object does'nt exist.
Wyy is this happenning ?
-SS