chavlji Posted November 10, 2010 Share Posted November 10, 2010 I use NEntSelP to convert current selection to SubEnts. So for all sel. sets that were picked by mouse clicks i use: (setq EName (NEntSelP "" PT)) where PT is point of mouse click transformed to World coordinates. It works if all points are visible. As soon as user pans the viewport, so that one or more point is not on the visible screen anymore, NEntSelP returns nil! Why? How to correct it? Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 10, 2010 Share Posted November 10, 2010 (vla-zoomextents -> vla-zoomprevious Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 10, 2010 Share Posted November 10, 2010 where PT is point of mouse click transformed to World coordinates. Probably won't solve your issue, but I believe nentselp takes points in UCS Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 10, 2010 Share Posted November 10, 2010 Probably won't solve your issue, but I believe nentselp takes points in UCS He's having issues with trying to select an object at a point that's outside of the current view. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted November 10, 2010 Share Posted November 10, 2010 (if (and (setq pt (getpoint)) (setq ss (ssget pt))) (setq eName (ssname ss 0))) Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 10, 2010 Share Posted November 10, 2010 (if (and (setq pt (getpoint)) (setq ss (ssget pt))) (setq eName (ssname ss 0))) Won't work if point is outside of view and the return isn't nested (assuming the OP wants that). Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 10, 2010 Share Posted November 10, 2010 He's having issues with trying to select an object at a point that's outside of the current view. I know 1234567890 Quote Link to comment Share on other sites More sharing options...
chavlji Posted November 11, 2010 Author Share Posted November 11, 2010 I just want to convert Selection Set that I get with (SSGet "_I") - selection set that existed before my function was executed - into subentities instead of main entities. I convert only those elements that were selcted by single picks. And pick is point. I solved by: (if (not (InsideRect PT ScreenRect )) (AbsMoveView pt))) (setq NSS (nentselp "" PT)) Clumsy and unreliable (if zoom changed pickbox might miss everything), but I don't think it can be done any other way... Any suggestions are greatly accepted Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 11, 2010 Share Posted November 11, 2010 Zoom extents and zoom previous. Use vla instead of command because it will ignore if the viewport is locked and sense you are going to set the zoom back to its previous state, who cares. Quote Link to comment Share on other sites More sharing options...
chavlji Posted November 11, 2010 Author Share Posted November 11, 2010 You can have multiple objects selected in one SS with multiple picks. Between picks user can zoom in/out. You can't know at what zoom each pick was made... So zooming to previous state wouldn't do. You don't know at wich state certain pick was made. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 11, 2010 Share Posted November 11, 2010 IMO, it sounds like there could be a better way to approach your overall goal. Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 11, 2010 Share Posted November 11, 2010 You can have multiple objects selected in one SS with multiple picks. Between picks user can zoom in/out. You can't know at what zoom each pick was made...So zooming to previous state wouldn't do. You don't know at wich state certain pick was made. Make your selections and add them to a selection set. Based on the given information (not much), it's the only option. When you only have a point select with, you can't select what you can't see. IMO, it sounds like there could be a better way to approach your overall goal. Agreed. Granted, it would be a lot easier to help one reach that goal if they were a little more liberal with the information. Quote Link to comment Share on other sites More sharing options...
chavlji Posted November 11, 2010 Author Share Posted November 11, 2010 Widely what is my goal: User often selects some objects and THEN executes certain command that is supposed to do something with that objects. We all agree that it is very annoying if function asks user to select objects, if they have already been selected before he has run function. And what if program is supposed to do something with subentities instead of main entities? I need a function that can determine wich subentites are already selected (implied selection).... Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 11, 2010 Share Posted November 11, 2010 How are you selecting the subentities before executing the command, Ctrl+Left click? Quote Link to comment Share on other sites More sharing options...
chavlji Posted November 12, 2010 Author Share Posted November 12, 2010 No, just usual left click several times 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.