MaxStudio Posted March 2, 2009 Share Posted March 2, 2009 I'm so close to finishing this layer/saved view script. My current problem is finding a way to duplicate and rename a layer that is currently in the file. Any suggestions? Thanks Quote Link to comment
Pat Stanford Posted March 2, 2009 Share Posted March 2, 2009 Procedure Test; Var H1 : Handle; S1 : String; Begin H1:=ActLayer; S1:=concat(GetLName(H1),Date(2,2)); H1:=CreateLayer(S1,1); End; Run(Test); Will give you a layer with the same scale and different name than the active layer. It looks like you will have to script the transfer of Z, delta Z, and layer colors if that is important. Quote Link to comment
MaxStudio Posted March 2, 2009 Author Share Posted March 2, 2009 Thanks Pat, but unfortunately it didn't work the way I had hoped. I was hoping that all the content on the layer would be duplicated as well. Another solution to my current problem would be to copy and paste in place a symbol. I have a drawing border with a title block that is on Layer A. Unfortunately if I place the symbol on a new layer it loses its Linked Record capabilities. I'm hoping if I copy and paste the drawing border it will retain its linked record. I guess a 3rd solution would be to just place a new drawing border on the design layer.. i dont know if this is possible. Quote Link to comment
MaxStudio Posted March 2, 2009 Author Share Posted March 2, 2009 (edited) currently i'm researching DoMenuTextByName and NNA:Menu Selectors possibly this is the route for me to take... I think my main problem is figuring out a way to activate the Drawing Border so I can copy it. maybe i can just activate the layer, setselect the drawing border and title block, then paste it on the other layer... i just don't know how to reference the drawing border and title block. Possibly a SelectAll will work... Edited March 2, 2009 by MaxStudio Quote Link to comment
MaxStudio Posted March 2, 2009 Author Share Posted March 2, 2009 Ok the following worked: Procedure Test; Begin Layer('A-01'); SetLayerOptions(4); SelectAll; DoMenuTextByName('Copy',0); Layer('A-02'); DoMenuTextByName('Paste In Place',0); End; Run(Test); The next step is finding a way to reference the number of saved views that exist in the file. Each saved view needs its own design layer with a title block. So i need to figure out a way to reference the number of saved views so I can correctly number my layers. Is this confusing? 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.