Measure element lengths within fence using the overlap setting.

I have a lot of line elements drawn and I want to create a fence and measure the portion of lines that are enclosed by the fence.  I have my fence setting set to Overlap which successfully gets the contents of the fence but I don't know how to get lengths for only the parts of the lines that are within the fence.  Strictly speaking this appears to be possible by setting the fence to clip and then getting the contents but by doing that all my lines would then be clipped, and that's no good.  Perhaps I should clip the lines and then programmatically undo the clips immediately after collecting the lengths.  Is this possible?  Is this my best route or might there be another route I haven't considered?

Thanks

Parents
  • You're right to be cautious about executing a destructive action, even if you can undo it. Here's an alternative …

    1. Create a new, empty, model
    2. Make the new model the active model
    3. Attach the model that contains your measurement candidates as a reference
      • At this point the user sees whatever was previously on screen
      • Ask the user to place a fence
    4. Enumerate the fence contents programmatically
    5. Add each element (i.e. a copy or clipped copy of the original) to the active model
    6. Do whatever you want to the active model
    7. Activate the original model
      • Discard (delete) the temporary model containing the clipped elements

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Reply
  • You're right to be cautious about executing a destructive action, even if you can undo it. Here's an alternative …

    1. Create a new, empty, model
    2. Make the new model the active model
    3. Attach the model that contains your measurement candidates as a reference
      • At this point the user sees whatever was previously on screen
      • Ask the user to place a fence
    4. Enumerate the fence contents programmatically
    5. Add each element (i.e. a copy or clipped copy of the original) to the active model
    6. Do whatever you want to the active model
    7. Activate the original model
      • Discard (delete) the temporary model containing the clipped elements

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Children
No Data