michaelk Posted December 6, 2019 Share Posted December 6, 2019 What is the order number in the Design and Sheet layer origination called? The one that you drag to change the stacking order of layers. And is there a function that returns it and a function that sets it? Quote Link to comment
Julian Carr Posted December 6, 2019 Share Posted December 6, 2019 A1. Layer stacking order. A2. Don't know. Quote Link to comment
michaelk Posted December 6, 2019 Author Share Posted December 6, 2019 lol Thanks Julian! I thought it was stacking order, but I can't find any reference to stacking order in the function reference. Quote Link to comment
angelojoseph Posted December 6, 2019 Share Posted December 6, 2019 What do you mean by the second question? Do you mean through scripting, or are you just trying to change them? Quote Link to comment
michaelk Posted December 6, 2019 Author Share Posted December 6, 2019 I'm trying to read them in a script. I did a little experimenting. It looks like (for sheet layers at least) the order in which the CreateLayer function appears in the script is the stacking order. So it may not be possible to GetLayerStackingOrder(h), which is what I was hoping for. 🙂 1 Quote Link to comment
michaelk Posted December 6, 2019 Author Share Posted December 6, 2019 Looking at the appendix, there is a ObjectVariableBoolean(156) that is described as Layer Repaginate. Anyone know what that is for? Quote Link to comment
angelojoseph Posted December 6, 2019 Share Posted December 6, 2019 If I remember correctly, that has to do with setting visibilities of detail at scale Quote Link to comment
Pat Stanford Posted December 6, 2019 Share Posted December 6, 2019 Procedure Test; Var H1:Handle; Begin H1:=FLayer; While H1<>Nil do Begin AlrtDialog(GetLName(H1)); H1:=NextLayer(H1); End; End; Run(Test); Try the above script and see what happens when you move the layers around. Throw in a check to see if the layer is Design or Sheet and you should be able to get what you need relatively easily. Interestingly, Flayer gives the highest numbers Design Layer, but when it wraps around to the Sheet Layers it starts with the lowest number in the stack order. If you need to change the order check out HMoveForward and HMoveBackward. 1 Quote Link to comment
michaelk Posted December 7, 2019 Author Share Posted December 7, 2019 whoa Never considered using HMoveForward on a layer. Here's another cool discovery from Pat's script. I just ran it on the drawing I'm working on. This is what I got: 1. Design Layers. Bottom of the stacking order to the top. 2. Sheet Layers. Top of the stacking order to the bottom. 3. Design Layers in a file referenced into a DLVP!!! Prefaced by NNA#7_ then the design layer name. Bottom of the stacking order to the top. Quote Link to comment
VectorGeek Posted December 7, 2019 Share Posted December 7, 2019 michaelk (and Pat!): This is MASSIVE, and solves my issue as posted (and reposted) over the past years: The "hidden prefix" means that I can control the layer visibility within DLVPs with VectorScript, and that will save us considerable bloat in our files (ask me and I can explain). One interesting note is that when I run Pat's script, I get a response that DLVP layers have prefix of NNA#1_ (not NNA#7_)...wondering if that was a typo or if there is some more mystery here...?? Thanks for this. I have been struggling for some time to get this working!! V-Geeque #gowisconsin 1 Quote Link to comment
michaelk Posted December 7, 2019 Author Share Posted December 7, 2019 Not a typo. I saw NNA#7. Are you still running v2016? I've seen that NNA#(num) in other places. (especially in worksheet database criteria) I'm led to believe that the numbers don't have a meaning, they just increment as the need for a new identifier arrises. I don't have a machine available that will run 2016, but it would be interesting run that script on 2016 > 2020 and see if the number changes. I ran it on a 2019 file I happened to be working on. I'm really glad I used that file that and not a pristine test file. 🙂 Quote Link to comment
VectorGeek Posted December 7, 2019 Share Posted December 7, 2019 Hi michaelk: I am running Vectorworks 2019 SP 5.3, Mac OS X Mojave. I duplicated the DLVP several times and ran the command - still coming up as NNA#1_. I'll try creating a new DLVP with different layers, and from a different referenced file. Perhaps the number increments in that case. Will report back. VG. Quote Link to comment
VectorGeek Posted December 7, 2019 Share Posted December 7, 2019 Yup that's it. Creating a second external reference would make those layers have an NNA#2_ prefix. A third references's layers would be NNA#3_ etc.etc. Confirmed by test file. So that explains why you saw NNA#7_ and I saw NNA#1_. VG 1 Quote Link to comment
michaelk Posted December 7, 2019 Author Share Posted December 7, 2019 Mystery solved! The drawing I was working on used to have many more references. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.