stevesfr Posted May 23, 2010 Author Share Posted May 23, 2010 Believe me, I feel and know your pain. I did (and still do some) survey work when I first started in CAD and it was a lot of 'dot connecting'. Hell, I'll be adding to to my own toolbox come Monday. Out of curiosity, which OC version did you take? Did you see the last video I posted (where it connects everything matching selected object's description? Alan: My favorite CB version has a connecting line from last selected object to cursor. Yes I saw the video, looks like the line connecting matching selected object's description could go bonkers now and then ? and then operator would have to guess which which is which and do editing. (or am I wrong?) I didn't see where I could copy and play with that version. Again,love it!! Been entering transparent command for this for years and years... thought it may have been impossible to fix / solve and get to this end. Now won't cuss surveyors for their data mess. I think I'll rename the command AT S Quote Link to comment Share on other sites More sharing options...
SEANT Posted May 23, 2010 Share Posted May 23, 2010 Upon further testing it seems you are corrent Sean, when using command, then current UCS is considered. Only that in my experience, when retrieving entity coordinates, the plane in which the entity resides must be considered when transforming the coordinates - this plane may be different from both WCS and UCS. Dealing with odd UCSs or OCSs does become a bit of a pain. The issue arises painfully more often in VBA, as it doesn’t hook into a command function, ThisDrawing.SendCommand, particularly well. Adding a Rotation property into the mix makes the process even more of a handful. Here is a link that documents my VBA effort at coordinating the various factors (if anyone is interested). I suspect that task would have been trivial in Lisp. http://discussion.autodesk.com/forums/thread.jspa?messageID=5825854 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 23, 2010 Share Posted May 23, 2010 Dealing with odd UCSs or OCSs does become a bit of a pain. The issue arises painfully more often in VBA, as it doesn’t hook into a command function, ThisDrawing.SendCommand, particularly well. Adding a Rotation property into the mix makes the process even more of a handful. Here is a link that documents my VBA effort at coordinating the various factors (if anyone is interested). I suspect that task would have been trivial in Lisp. http://discussion.autodesk.com/forums/thread.jspa?messageID=5825854 Thanks Sean, I'll have a read, but it takes me longer to look through VBA Lee, what are your settings for Camtasia? I use 'Recording Dimensions' to get the correct size when converting to a GIF. Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 24, 2010 Share Posted May 24, 2010 Alan:My favorite CB version has a connecting line from last selected object to cursor. Yes I saw the video, looks like the line connecting matching selected object's description could go bonkers now and then ? and then operator would have to guess which which is which and do editing. (or am I wrong?) I didn't see where I could copy and play with that version. Again,love it!! Been entering transparent command for this for years and years... thought it may have been impossible to fix / solve and get to this end. Now won't cuss surveyors for their data mess. I think I'll rename the command AT S Glad it helps. Quote Link to comment Share on other sites More sharing options...
Demesne Posted July 2, 2010 Share Posted July 2, 2010 Alan, Is there any way that instaead of connecting with lines, the code in post #31 could work to connect objects with 3D polylines? This is a great routine as it is. It's already saved me alot of time - thanks to you all! Demesne Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted July 2, 2010 Share Posted July 2, 2010 vlax-3d-point Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 2, 2010 Share Posted July 2, 2010 Alan, Is there any way that instaead of connecting with lines, the code in post #31 could work to connect objects with 3D polylines? This is a great routine as it is. It's already saved me alot of time - thanks to you all! Demesne I might play with it later. vlax-3d-point Nope. Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted July 2, 2010 Share Posted July 2, 2010 haha. I tried. I failed. Quote Link to comment Share on other sites More sharing options...
Demesne Posted July 2, 2010 Share Posted July 2, 2010 I failed first!! Thanks anyway. ..and thanks Alan. I am currently using Dotsoft ToolPac so converting to and joining 3D polys is easy enough - Just takes a little more time! Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 2, 2010 Share Posted July 2, 2010 I'd hate to deprive you of getting your money's worth from your DotSoft package. I've been using this a bit myself. I think I may do a bit more developing on this. Quote Link to comment Share on other sites More sharing options...
Demesne Posted July 2, 2010 Share Posted July 2, 2010 Oh that's just cruel! How do you do it? Pleeease! Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 2, 2010 Share Posted July 2, 2010 Oh that's just cruel! How do you do it? Pleeease!Did you make an attempt at it? Quote Link to comment Share on other sites More sharing options...
Demesne Posted July 9, 2010 Share Posted July 9, 2010 Well, only in as much as I looked at the code and then realised there wasn't a simple line to change from say 'line' to '3dpolyline'. I sometimes manage to tweak lisp to do what I want it to but those changes are very basic. My programming capabilities are limited to Casio calculators! I wish I had more time to sit down and learn how to actually write my own code. I see from your animation that you have connected with a polyline, can this be done with a 3D polyline? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 9, 2010 Share Posted July 9, 2010 Give this a go: (defun c:BlkCon ( / ent l gr code data ss ) (vl-load-com) ;; © Lee Mac 2010 (if (setq ent (LM:SelectifFoo (lambda ( x ) (eq "INSERT" (cdr (assoc 0 (entget x)))) ) "\nSelect Block: " ) ) (progn (setq l (list (cdr (assoc 10 (entget ent))))) (while (progn (setq gr (grread 't 13 2) code (car gr) data (cadr gr)) (redraw) (cond ( (and (= 5 code) (listp data)) (mapcar '(lambda ( from to ) (grdraw (trans from 0 1) (trans to 0 1) 4 1) ) (cons (trans data 1 0) (reverse (cdr (reverse l)))) l ) t ) ( (and (= 3 code) (listp data)) (if (setq ss (ssget data '((0 . "INSERT")))) (setq l (cons (cdr (assoc 10 (entget (ssname ss 0)))) l)) ) ) ( (member code '(13 32 25)) nil ) ( t ) ) ) ) (entmakex (list (cons 0 "POLYLINE") (cons 10 '(0 0 0)) ) ) (mapcar '(lambda ( p ) (entmakex (list (cons 0 "VERTEX") (cons 10 p)) ) ) l ) (entmakex (list (cons 0 "SEQEND"))) ) ) (princ) ) (defun LM:SelectifFoo ( foo str / sel ent ) ;; © Lee Mac ~ 12.06.10 (while (progn (setq sel (entsel str)) (cond ( (vl-consp sel) (if (not (foo (setq ent (car sel)))) (princ "\n** Invalid Object Selected **") ) ) ) ) ) ent ) Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 9, 2010 Share Posted July 9, 2010 It is a 3dPolyline. When you list a 2d or 3dpolyline, it will just say 'Polyline'. Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 9, 2010 Share Posted July 9, 2010 Give this a go: And you made me feel bad for posting how how to delete an entity within a block. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 9, 2010 Share Posted July 9, 2010 And you made me feel bad for posting how how to delete an entity within a block. Grow up ... Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 9, 2010 Share Posted July 9, 2010 Grow up ... Get a life. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 9, 2010 Share Posted July 9, 2010 Get a life. Very mature - see post #57 Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 9, 2010 Share Posted July 9, 2010 Very mature - see post #57 Clever. Have a good weekend. I'm off to the woods. 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.