Crainiate Community

Support and discussion for users of Crainiate component software products
Welcome to Crainiate Community Sign in | Join | Help
in Search

clear a layer

Last post 09-02-2008 10:09 PM by James Westgate. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-28-2008 11:15 PM

    clear a layer

    I need to clear a specific layer and tried this.

    _layer2.Elements.Clear();

    but get the error as follows....

    This collection is not modifiable.

    What is the recommended method?

    Thanks, John

    Filed under:
    • 164.144.248.25
  • 09-02-2008 10:09 PM In reply to

    Re: clear a layer

    You will manually need to clear the layer by looping through the Shapes/Lines collection and adding a reference to the element in a List. Then loop through the adhoc list and remove the element. You need to use a temporary list because you cannot modify a collection when you are iterating through it. We will add this functionality to a later release
    • 86.149.156.77
Page 1 of 1 (2 items)