casariana Posted July 23, 2019 Posted July 23, 2019 Hello everyone, When I create a new layer using (command "._Layer" "_Make" "layer_name" "_Color" "94" "layer_name" "_LT" "Continuous" "layer_name" "") Even if I set the new layer as current with (setvar "clayer" "layer_name") Although the layer is created, It won't show at the layer palette, unless I close and reopen the drawing or insert an object at the layer. The same happens when I use the Steal code from Lee Mac. I also tried to thaw and turn the layer on using this code I adapted from some forum (sorry I didn't credit the code I based mine, but I cannot find it anymore): (defun turn_on ( layer / dx en in ss ) (vl-load-com) (if (not (null (setq en (tblobjname "LAYER" layer)))) (progn (if (and (setq en (entget en) dx (assoc 70 en) en (entmod (subst (cons 70 0) dx en)) ) (setq ss (ssget "_X" (list (cons 8 layer)))) ) (progn (repeat (setq in (sslength ss)) (entupd (ssname ss (setq in (1- in)))) ) ) ) (vla-put-LayerOn (vlax-ename->vla-object (tblobjname "LAYER" layer)) 1) ) ) (princ) ) Still, the layer created is not showing in the layer palette list. How could I fix it? Thanks a lot! Quote
Roy_043 Posted July 25, 2019 Posted July 25, 2019 You have sent me a PM which refers to this topic I think. The fact that you have received no answer does not means members have missed it. It may just be a problem that is hard, or impossible, to solve. IMO it is probably a bug in the layer palette list. I use BricsCAD and do not encounter this bug with, what I think is, the equivalent feature: the Layers panel. Maybe there are commands to close and reopen the palette in AutoCAD that can be used to create a workaround? Quote
tombu Posted July 25, 2019 Posted July 25, 2019 Assuming you're using a Ribbon or Toolbar macro simply add CLAYER layer_name to the end instead of (setvar "clayer" "layer_name") The Ribbon display doesn't update to code as that would slow the code. Quote
ronjonp Posted July 25, 2019 Posted July 25, 2019 I just tested in AutoCAD 2019 and could not reproduce this? Do you have all service packs installed? What graphics card are you running? Quote
casariana Posted July 25, 2019 Author Posted July 25, 2019 8 hours ago, Roy_043 said: You have sent me a PM which refers to this topic I think. The fact that you have received no answer does not means members have missed it. It may just be a problem that is hard, or impossible, to solve. IMO it is probably a bug in the layer palette list. I use BricsCAD and do not encounter this bug with, what I think is, the equivalent feature: the Layers panel. Maybe there are commands to close and reopen the palette in AutoCAD that can be used to create a workaround? Thank you very much for your answer and sorry to bother you, I got worried I messed it up! Anyway, I tried to do what you said and it did not solve my problem, unfortunately. But I am greatful for your reply! 4 hours ago, tombu said: Assuming you're using a Ribbon or Toolbar Tombu, thank you for your reply but I am not using Ribbon or Toolbar. I was refering to the layer palette, the layer properties manager. 3 hours ago, ronjonp said: I just tested in AutoCAD 2019 and could not reproduce this? Do you have all service packs installed? What graphics card are you running? Hey ronjonp, thank you for your help! I use the student version, so I don't have all the service packs. I have a Intel HD Graphics 520. You say you could not reproduce it so the created layer was displayed at the layer palette? That's intriguing Anyways, what kinda solved my question was to make a block with a matrix of points from all layers. Then I insert and erase the block after creating the layers. This way I garantee that an object of each layer is being inserted. This doesn't please me, but works. Quote
tombu Posted July 25, 2019 Posted July 25, 2019 (edited) Just guessing in your Layer Properties Manager is the Active Filter "All Used Layers"? Change it to All. Edited July 25, 2019 by tombu Quote
casariana Posted July 26, 2019 Author Posted July 26, 2019 17 hours ago, tombu said: Just guessing in your Layer Properties Manager is the Active Filter "All Used Layers"? Change it to All. Yes! That's it! I feel kind of stupid I didn't see that before. Thank you very much! Quote
tombu Posted July 26, 2019 Posted July 26, 2019 24 minutes ago, casariana said: Yes! That's it! I feel kind of stupid I didn't see that before. Thank you very much! It's always good to hear a puzzle has been solved. Thanks for letting us know. 1 Quote
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.