Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/13/2023 in all areas

  1. Hello friends, Running a forum like this often feels like a long-running battle against those who would like to deface or destroy what we do here. From time-to-time we need to change the way we operate to stay one step ahead of the hackers and haters. From today, the way you login to this forum will change. Historically, you've been able to login using your screen name and password. The problem with this approach is that your screen name is publicly available, so all a hacker has to do is to find your password. From today, you will not be able to login using your screen name, you will need to use the email address associated with your account. Since your email address is not publicly available, this change presents a significant defense against hackers. If you already login using your email address, you do not need to change the way you login. We recommend that you always use a strong password to avoid your account being hacked.
    2 points
  2. This. but it doesn't solve the problem just makes one big selection set. (setq SS (ssget '((0 . "*TEXT,DIMENSION") (1 . "*#*,~*@*")))) Need to find the entities that are only in both selection sets. texts that have numbers but don't have any letters. and unless your going to process a lot of text. I think it might be a wash. Since distof weeds out the text you can't use. but you can look at this and pull a few functions so you can process text that have letters and numbers. (if (setq SS (ssget '((0 . "*TEXT,DIMENSION") (1 . "*#*")))) (progn (if (setq SS1 (ssget "_P" '((0 . "*TEXT,DIMENSION") (1 . "~*@*")))) (foreach text (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS1))) (if (ssmemb text ss) (ssadd text ss2) ) ) ) ) )
    1 point
  3. I managed to reverse them by myself. Thanks again for your help, much appreciated!
    1 point
  4. and try this, Add the code I posted above into your LISP file and change the cgpoly part for the below, see if that works by taking away the VLA- part (defun cgpoly (/ lst ss i en obj) (and (setq ss (ssget "X" '((0 . "LWPOLYLINE") ; object Name (-4 . "&=") ; bit coded (70 . 1) ; polyline is closed ) ) ) (repeat (setq i (sslength ss)) (setq en (ssname ss (setq i (1- i))) obj (vlax-ename->vla-object en) ) (write-line "<LWPOLYGON>" file) (write-line (strcat "<LAYER>" (vlax-get obj 'Layer) "</LAYER>") file) (write-line (strcat "<HANDLE>" (vlax-get obj 'Handle) "</HANDLE>") file) (write-line (strcat "<AREA>" (rtos (vlax-get obj 'Area) 2 4) "</AREA>") file) ;---- (setq lst (getcoords en)) (setq idx 0) (setq xy "") (repeat (length lst) (setq xy (strcat xy (rtos (car (nth idx lst)) 2 3) " " (rtos (cadr (nth idx lst)) 2 3) ", ")) (setq idx (+ 1 idx)) ) (write-line (strcat "<LOCATION>POLYGON((" (vl-string-trim ", " xy) "))</LOCATION>") file) ;---- (write-line "</LWPOLYGON>" file) ) ) )
    1 point
  5. This should also return a list of coordinates: (defun getcoords ( en / coordslst ) (setq coordslst (list)) (setq enlst (entget en)) (foreach x enlst (if (= (car x) 10) (setq coordslst (append coordslst (list (cdr x)))) ) ; end if ) ; end foreach coordslst ) Will have a look to see how to fit it into your code
    1 point
  6. From MHUPPs idea, try this: Added in Dimensions for my own use (I had something that worked, and then saw a better method and now want to spend time making mine better again) (setq SS (ssget '( (-4 . "<OR") (-4 . "<AND") (0 . "*TEXT") (-4 . "<AND") (1 . "*#*") (1 . "~*@*") (-4 . "AND>") (-4 . "AND>") ; maybe too many ANDs here (-4 . "<AND") (0 . "DIMENSION") (-4 . "AND>") (-4 . "OR>") ) )) ; end ssget, setq
    1 point
  7. mmm I guess would limit text that have numbers in it. only numbers IDK. (setq SS (ssget '((0 . "*TEXT") (1 . "*#*")))) -Edit This says any text that doesn't have a letters in it. (setq SS (ssget '((0 . "*TEXT") (1 . "~*@*")))) -Edit2 I guess you could then check them against each other and keep the ones that are in both. if you really wanted to be sure. Wildcards
    1 point
  8. If you have access to Autocad then by all means, give it a try. I personally don't like doing 3D work in Autocad though. I've never used Rhino but I have used other similar programs like Fusion360 which I found to be easier and more flexible than Autocad. That's just my opinion though. Working with 3D programs is all about finding the one that works best for you, so I always recommend trying different programs and see which one you like best. But having said that, all programs are going to have a learning curve. They will all be difficult at first, until you get used to the interface and how the tools work, so I wouldn't give up on Rhino just yet. If you keep watching tutorials and practicing it will start getting easier.
    1 point
×
×
  • Create New...