Is it possible to create sublayers from a macro?
Sure, just use the double-colon syntax.
-layer new “Parent Layer::Child Layer::GrandchildLayer”
Double quotes are required if your layers have spaces in their names, otherwise they aren’t required.
That’s it - thanks!
Is this a documented feature? I couldn’t find it anywhere.
Hi John - that is an excellent question - it may not be, I don’t see it yet… I’ll see if I can figure out where best to add it if it is not in there someplace, probably under both the Layer command and under the bit that covers macros.
So I can figure this out, where/how did you look for this information?
Pascal, how did you know this? Do you remember?
Not Pascal here… This layer/sublayer syntax is known by people who write scripts, as it’s needed for a lot of layer related functions. However, I’m not sure I’ve seen it in a help file anywhere, it might just be something that has been passed along in forum posts among scripters/developers…
And perhaps worth noting is that when you round-trip e.g. a STEP file, the layer hierarchy is flattened and the resulting layers get the parent::child long name.