Delete an element

Hii....

    I have placed two different elements in the same file position. The two elements are of different tagset. One is signal tagset and other element is internet tagset.

I want to delete only the element with internet tagset by passing the file position. Is it possible.

If i use this,

mdlElement_undoableDelete( NULL, file_pos, TRUE);

it will delete the two elements. But it should not be happened.

Please help me.

 

Thanks,Mythili

Parents
  • happynjoy said:
    mdlElement_undoableDelete (NULL, file_pos, TRUE); it will delete the two elements.

    Each element has a unique file position within its model. File position is terminology that survived from earlier versions of MicroStation — in V8 it's no more than a sequential index into a cache.

    When you call mdlElement_undoableDelete, it is looking for the element at the specified file position within the active model. If it deletes more than one element then something else is wrong.

    Perhaps you could reveal a little more code.

    • What element are you attempting to delete?
    • How do you obtain file_pos?
    • Why are the tag sets relevant?

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

  • First, you should show us, how you added two elements with same file position. I do not think it is possible, all you could do is to place them under one header or as a chain, so they look to be on one file position because there is a conjunction between elements in their descriptors. You can try to read element's descriptor at that position, set its 'next' and 'previous' to NULL, rewrite it and then delete it.

    Dan

Reply
  • First, you should show us, how you added two elements with same file position. I do not think it is possible, all you could do is to place them under one header or as a chain, so they look to be on one file position because there is a conjunction between elements in their descriptors. You can try to read element's descriptor at that position, set its 'next' and 'previous' to NULL, rewrite it and then delete it.

    Dan

Children
No Data