FM10 ExtendScript MarkerType Deletion -- Possible Bug

Michael Pearson michael.t.pearson at gmail.com
Mon Sep 12 14:49:39 PDT 2011


Hi All,

Does anyone know if it's possible to delete a custom MarkerType using
ExtendScript? I'm either very thick today or encountering a bug, because I
can't make it work for the life of me. Here's code that I think ought to do
the job:

 var doc = app.ActiveDoc;
var markerType = doc.GetNamedMarkerType('MyMarker');
if (markerType.ObjectValid()) {
    var result = markerType.Delete();
    if (result == Constants.FE_Success) {
        $.write('Delete() method returned success.\n');
    }
}
var markerType = doc.GetNamedMarkerType('MyMarker');
$.write('Does marker type still exist after programmatic delete? ' +
markerType.ObjectValid() + '\n');


The results I see in the JavaScript console when I run this on a document
containing a custom marker type with the name "MyMarker" are:

Delete() method returned success.
Does marker type exist after programmatic delete? 1


Those messages indicate that the delete was successful AND that the
MarkerType still exists. I'm assuming this must be a bug. Can anyone confirm
or spot an error in my code that I'm too tired to see?

Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frameusers.com/pipermail/framers-frameusers.com/attachments/20110912/9c732588/attachment.htm>


More information about the framers mailing list