Creating "shaded with no edges" views by moving curves to new layers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I'm currently creating a tool for Inv 2026 that when ran, will move all drawing curve segments in an idw view to a new layer, so that the new layer can be turned off when creating pdf's. This allows us to create a "shaded with no edges" style view, so that we can really clearly show shaded colours on large views. This could be done manually of course by select as edges, but we have massive views with 200,000+ segments, so we need it to be automated.
When the code first runs, it goes through the curve segments and scans them to see what current layer they're on. It then builds them into an object collection, and executes a change layer for all curves in each layer type to it's new respective "Invisible - " layer. This works really well and fast on the initial run.
However, If I re-run the code on the same view - which has already had all of it's curves overridden to a new layer - the scanning takes longer and longer and also massively builds ram, even if the new layer visibility is turned on, so it's not a visibility on/off problem.
I can see that by default, a drawing curve layer is set to "By Standard". So it seems like on the first scan, it goes quicker because it's reading the "By Standard" layer status without having to look up anything. When ran the second time - with the curves already overridden to a new layer - it seems like it's having to check each curve more than before, which in turn is storing something in the cache each time, hence the increasingly slow scan rate & ram build up. For reference, on a view with 50,000 segments. First run takes 4 seconds to scan, second run takes 1 hour to scan (starts off fast, but gets slower)
What I'd love to know is:
1. Is there a way in the API to set a drawing curve back to "By Standard" layer, not just the original name? The setting is there in the UI (top of the layer dropdown in the annotate tab), but I can't seem to find a way to access it through the API. At the moment, it starts as "By Standard (Visible (ISO))", it gets changed to "Invisible - Visible (ISO)", and then if i try set it back it goes to original using API it gets set to "Visible (ISO)" without the By standard at the top.
2. Is there a way of detecting if a curves layer has it's visibility already turned off? This would make the scanning quicker, as I can turn off the new layers at the start, and essentially the overridden curves.
3. If anyone has any other different approaches that might be useful for this sort of thing?
Thanks