Hudson Posted October 22, 2009 Share Posted October 22, 2009 Does anyone know that I can automatically select an entity if I already know the beginning and ending coordinates? My understanding was that each time the a drawing is loaded it will/can have a different id?? Thanks, Andrew Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 22, 2009 Share Posted October 22, 2009 Does anyone know that I can automatically select an entity if I already know the beginning and ending coordinates? My understanding was that each time the a drawing is loaded it will/can have a different id?? Thanks, Andrew (nentselp POINT) or (ssget "WP" POINTLIST) or (ssget "F" POINTLIST) Quote Link to comment Share on other sites More sharing options...
Hudson Posted October 22, 2009 Author Share Posted October 22, 2009 (nentselp POINT)or (ssget "WP" POINTLIST) or (ssget "F" POINTLIST) Sean thanks... that's getting me really close. I suppose I can filter out objects selected by accident by that method.. which is probably pretty likely. Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 22, 2009 Share Posted October 22, 2009 Sean thanks... that's getting me really close. I suppose I can filter out objects selected by accident by that method.. which is probably pretty likely. Just use regular ssget filtering. Who's Sean? Quote Link to comment Share on other sites More sharing options...
Hudson Posted October 26, 2009 Author Share Posted October 26, 2009 Just use regular ssget filtering.Who's Sean? I was replying quickly and looked at your sig and got confused Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 26, 2009 Share Posted October 26, 2009 I was replying quickly and looked at your sig and got confused Did you get it sorted out? Quote Link to comment Share on other sites More sharing options...
Hudson Posted November 2, 2009 Author Share Posted November 2, 2009 Yes, I finally did.. I just started mucking with it today.. the only way I could get it to select the arc was to take the begin and end coords swap the x values and use a fence (so the fence would cross the arc). But that worked nicely.. first time I've worked with selection sets... fun Quote Link to comment Share on other sites More sharing options...
CarlB Posted November 2, 2009 Share Posted November 2, 2009 I just noticed in your original post: "My understanding was that each time the a drawing is loaded it will/can have a different id??" The object should always maintain the same "handle", you should be able to use that from session to session to identify/locate an object. Quote Link to comment Share on other sites More sharing options...
Hudson Posted November 2, 2009 Author Share Posted November 2, 2009 I just noticed in your original post: "My understanding was that each time the a drawing is loaded it will/can have a different id??" The object should always maintain the same "handle", you should be able to use that from session to session to identify/locate an object. That would simplify life.. Right now I have several files that record information that I need from instance to instance.. having the handle for an object and then calculating points from there would likely be less mess.. Quote Link to comment Share on other sites More sharing options...
CarlB Posted November 3, 2009 Share Posted November 3, 2009 You get the handle name from Group Code 5 of the entity data. Then knowing the handle, you get the entity name from: (handent handle) Quote Link to comment Share on other sites More sharing options...
Hudson Posted November 10, 2009 Author Share Posted November 10, 2009 Ok.. another quick (hopefully) question.. I got finding arcs down pat! But now I'm trying to select the line between 2 points (and only that line).. and I'm not having any luck... i figured the Fence would work.. I've since tried W WP.. Could I do what I'm doing for the arc (get begin and end point, swap either the x or y value of each pt so it's opposite) and then get the line and filter for lines with the length of the distance between the first non modified points? Is there any easier way to do that? Thanks for any and all input.. this is what my statement looks like now: (setq lineSS (ssget "WP" pt_list (list (cons 0 "LINE")))) Which doesn't work.. pt_list is the start end end points of the line. Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 10, 2009 Share Posted November 10, 2009 Ok.. another quick (hopefully) question.. I got finding arcs down pat! But now I'm trying to select the line between 2 points (and only that line).. and I'm not having any luck... i figured the Fence would work.. I've since tried W WP.. Could I do what I'm doing for the arc (get begin and end point, swap either the x or y value of each pt so it's opposite) and then get the line and filter for lines with the length of the distance between the first non modified points? Is there any easier way to do that? Thanks for any and all input.. this is what my statement looks like now: (setq lineSS (ssget "WP" pt_list (list (cons 0 "LINE")))) Which doesn't work.. pt_list is the start end end points of the line. Just use fence, or (ssget pnt '((0 . "LINE"))) Quote Link to comment Share on other sites More sharing options...
Hudson Posted November 10, 2009 Author Share Posted November 10, 2009 If it works with just the one point... why didn't I try that! Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 10, 2009 Share Posted November 10, 2009 If it works with just the one point... why didn't I try that! Sometimes it's the simplest of things that eludes us. Quote Link to comment Share on other sites More sharing options...
Hudson Posted November 10, 2009 Author Share Posted November 10, 2009 That's not working for me for whatever reason Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 10, 2009 Share Posted November 10, 2009 That's not working for me for whatever reason Little more vague. :wink: Fence or point? Quote Link to comment Share on other sites More sharing options...
Hudson Posted November 10, 2009 Author Share Posted November 10, 2009 It's giving me nil when I feed it point selection with either the end or the start point. (I'm 99.9% sure the point is 100% accurate... have it stored with full accuracy) Fence isn't working either Quote Link to comment Share on other sites More sharing options...
Hudson Posted November 10, 2009 Author Share Posted November 10, 2009 Ok, now the fence appears to be working... but now it can't find the arc.. I think I'm dealing with something other than straight logic on this one.. probably something to do with my program Quote Link to comment Share on other sites More sharing options...
Hudson Posted November 10, 2009 Author Share Posted November 10, 2009 I changed from: (setq curveSS (ssget "F" pt_list (list (cons 0 "ARC")))) To: (setq curveSS (ssget "F" pt_list '((0 . "ARC")))) And it's happy with me now. (same change for the line selections). I see that that is weird usage of the list and cons... but it was working for me that way before.. 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.