liuhaixin88 Posted February 24, 2014 Share Posted February 24, 2014 HI,guys,I need some help! TKS This code is hide object (defun c:yc () (if (ssget) (progn (vlax-for obj (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)) ) (vla-put-Visible obj :vlax-false) ) ) ) (princ) ) This code is display object (defun c:hfxs (/ ss) (if (setq ss (ssget "x" '((60 . 1)))) (vlax-for obj (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)) ) (vla-put-Visible obj :vlax-true) ) ) (princ) ) Now ,I want use command "yca" hide some object to Group A, use command "ycb" to hide some object to Group B,use command "ycc"hide some object to Group C , Use command "hfxsa" to display GroupA ,use command "hfxsb" to display GroupB ,use command "hfxsc" to display GroupC Quote Link to comment Share on other sites More sharing options...
MSasu Posted February 24, 2014 Share Posted February 24, 2014 For hiding the groups, the code is easy to build: (defun c:YCA() (command "_HIDEOBJECTS" "_G" "GroupA" "") (princ) ) For setting them back visible will require a more elaborate code since the group isn't an entity, but rather a dictionary entry so its items will need to be parsed. Quote Link to comment Share on other sites More sharing options...
Bhull1985 Posted February 24, 2014 Share Posted February 24, 2014 Msasu time to pick your brain a bit- what do you mean by "parsed"? I know it's a coding terminology likely similar to "processed" but was hoping for your own explanation, in your own terms. Thanks! Quote Link to comment Share on other sites More sharing options...
MSasu Posted February 24, 2014 Share Posted February 24, 2014 Msasu time to pick your brain a bit-what do you mean by "parsed"? I know it's a coding terminology likely similar to "processed" but was hoping for your own explanation, in your own terms. Thanks! Not being a native English speaker, I may miss sometime the full meaning of certain English words and, especially, expressions. But I'm quite sure that "to parse" is commonly used in programming environment and I'm not aware of it having an inappropriate sense along. That being said, I'm really not sure why my brain needs to "be picked"?!? But to satisfy you: To parse a collection = to navigate between its items in a given order; to iterate. Quote Link to comment Share on other sites More sharing options...
Bhull1985 Posted February 24, 2014 Share Posted February 24, 2014 Hah! From a native English speaker, me, to you: to "pick ones brain" is a common expression meaning "to learn from another , usually from a selection or series of questions" I surely was not trying to be a smarty-pants, was just trying to learn a thing or two from you. Parsed=iterate, that makes sense, and satisfies my query. I was under the thinking that it was different than iterate, hence my question, but your answer satisfies quite well. Thank you! Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted February 25, 2014 Author Share Posted February 25, 2014 wow! It's inscrutable. some one can help me? Quote Link to comment Share on other sites More sharing options...
MSasu Posted February 25, 2014 Share Posted February 25, 2014 Bhull1985, thank you for the clarifications! Quote Link to comment Share on other sites More sharing options...
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.