General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Modify selected elements?

  • queshaw

    Modify selected elements?

    Participants 1
    Replies 2
    Last Activity 3 years, 9 months ago

    I need to write a macro/script/program that alters the XML that the user has selected. In this case, the selection is expected to contain OASIS table rows. How can I find what is “selected”, i.e. elements that are highlighted after the user dragged a selection with the mouse?

    I read 2 posts roughly asking the same question. One answer uses IsInsertionPoint and suggests moving ranges around, but I have no idea how that would tell me what elements are highlighted.

    Another post uses Duplicate and Collapse, but when I try that it does not give me the elements that are highlighted by the user. Or, it gives me the parent of the elements that are highlighted, neither of which tell me what is highlighted. How can I do this?



    Derek Read

    Reply to: Modify selected elements?

    See my reply here, third in the thread:,4037.0.html

    The two relevant APIs are:

    If you can provide more information about what you need to accomplish I might be able to suggest something in more detail. Keep in mind that the actual end result (and starting condition) is the most important thing here as sometimes you can get there multiple ways.



    Reply to: Modify selected elements?

    Thank you!

    Ultimately, I want to set an attribute on rows within the selection.



  • You must be logged in to reply to this topic.

Lost Your Password?