0
FDK 7.1/FrameMaker 7.1 F_ApiDelete
New Here
,
/t5/framemaker-discussions/fdk-7-1-framemaker-7-1-f-apidelete/td-p/1235523
Apr 01, 2008
Apr 01, 2008
Copy link to clipboard
Copied
Hello.
I thing we have found a bug in FDK7.1 or FrameMaker 7.1.
We have a table cell in which there is a lot of Markers and Graphics anchors.
See this:
TC
|-Marker
|-Graph
|-Graph
|-Marker
.
.
.
There is aproximatelly 10 Marker element and 20 Graph elements.
Now we programattically delete all Graph element. So we use recurisve function to get all Graph element and than call on each:
F_ApiDelete(docId, elemId).
But suprised some Marker elements where deletes also.
It looks like there is a problem with elements, that are only one byte textranges.
Than we have replaced F_ApiDelete with F_ApiDeleteText and it worked.
So problem is not in our algorithm but in F_ApiDelete function.
Maybe problem is caused by invalid structure, because Graph,Marker elements are not allowed in structure.
Is this know bug?
Regards Peter
I thing we have found a bug in FDK7.1 or FrameMaker 7.1.
We have a table cell in which there is a lot of Markers and Graphics anchors.
See this:
TC
|-Marker
|-Graph
|-Graph
|-Marker
.
.
.
There is aproximatelly 10 Marker element and 20 Graph elements.
Now we programattically delete all Graph element. So we use recurisve function to get all Graph element and than call on each:
F_ApiDelete(docId, elemId).
But suprised some Marker elements where deletes also.
It looks like there is a problem with elements, that are only one byte textranges.
Than we have replaced F_ApiDelete with F_ApiDeleteText and it worked.
So problem is not in our algorithm but in F_ApiDelete function.
Maybe problem is caused by invalid structure, because Graph,Marker elements are not allowed in structure.
Is this know bug?
Regards Peter
TOPICS
Structured
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Mentor
,
/t5/framemaker-discussions/fdk-7-1-framemaker-7-1-f-apidelete/m-p/1235524#M4097
Apr 01, 2008
Apr 01, 2008
Copy link to clipboard
Copied
Hi Peter,
I have never known F_ApiDelete() to fail, whether or not on elements or other objects, and whether or not element structures are valid. I have used it for all these types of elements too. Are you absolutely sure your element IDs are valid? How are you obtaining them? Are you using the element tree to step through them with FP_FirstChildElement and FP_NextSiblingElement, etc.?
Russ
I have never known F_ApiDelete() to fail, whether or not on elements or other objects, and whether or not element structures are valid. I have used it for all these types of elements too. Are you absolutely sure your element IDs are valid? How are you obtaining them? Are you using the element tree to step through them with FP_FirstChildElement and FP_NextSiblingElement, etc.?
Russ
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
_Peter_Hanzel_
AUTHOR
New Here
,
/t5/framemaker-discussions/fdk-7-1-framemaker-7-1-f-apidelete/m-p/1235525#M4098
Apr 07, 2008
Apr 07, 2008
Copy link to clipboard
Copied
Hello.<br /><br />I am absolutly sure. First of all I am traversing trought elements using FP_FirstChildElement and FP_NextSiblingElement. And element ids (F_ObjHandleT) are stored in vector<F_ObjHandleT>.<br /><br />Than I call F_ApiDelete(ids) for each item in vector.<br /><br />As i said if I replace F_ApiDelete with F_ApiDeleteText, where textrange is:<br />tr.beg = F_ApiGetTextLoc( .. loc of marker, graphic)<br />tr.end = tr.beg<br />tr.end.offset++<br /><br />It works and deletes only correct elements.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Mentor
,
/t5/framemaker-discussions/fdk-7-1-framemaker-7-1-f-apidelete/m-p/1235526#M4099
Apr 07, 2008
Apr 07, 2008
Copy link to clipboard
Copied
Ah, you got me thinking now. Is a Graph element a paragraph-containing element? The reason I ask is that a marker has to live in some paragraph, even if it is represented structurally as a sibling to a paragraph. I'm not quite sure of the exact logic, but I do know that if you put a marker as a sibling to paragraph-containing elements, its actual text location will end up within one of those paragraphs. Therefore, if you delete the paragraph element, maybe it will force a delete of the marker element as well.
I don't know this absolutely for sure, and I don't know if this is the problem you are seeing. Just an idea, really.
Russ
I don't know this absolutely for sure, and I don't know if this is the problem you are seeing. Just an idea, really.
Russ
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Mentor
,
/t5/framemaker-discussions/fdk-7-1-framemaker-7-1-f-apidelete/m-p/1235527#M4100
Apr 08, 2008
Apr 08, 2008
Copy link to clipboard
Copied
As I think more on it, you could test this theory by manually deleting the Graph elements one by one, using the Structure View. If any Marker elements get deleted, it must be because the markers are living in a Graph element text range.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
_Peter_Hanzel_
AUTHOR
New Here
,
LATEST
/t5/framemaker-discussions/fdk-7-1-framemaker-7-1-f-apidelete/m-p/1235528#M4101
Apr 23, 2008
Apr 23, 2008
Copy link to clipboard
Copied
Hello.
No Graph elements are FO_Graphic, and Markers are normal FO_Marker. But they all are in Table Cell element.
I will try to manually delete it in Structure view.
No Graph elements are FO_Graphic, and Markers are normal FO_Marker. But they all are in Table Cell element.
I will try to manually delete it in Structure view.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

