Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/28/2022 in all areas

  1. Here is an example for you to learn from although doing it with DXF is much simpler and faster. (defun c:test ( / s o ) (and (setq s (car (entsel "\nSelect block to move to 0,0,0 : "))) (or (= (cdr (assoc 0 (entget s))) "INSERT") (alert "Invalid object selected !") ) (setq o (vlax-ename->vla-object s)) (or (vla-put-insertionpoint o (vlax-3d-point '(0. 0. 0.))) (vla-put-rotation o (* pi 0.25)) ;; rotation angle = 45 Deg. ) ) (princ) ) (vl-load-com)
    3 points
  2. Thanks for the suggestions, i think i found a simple one... (setq ssvalid1 (ssget "_X" (list (cons 0 "INSERT") (cons 8 validlisttotal) (cons 2 validlisttotalblocks)))) (setq ssvalid2 (ssget "_X" (list (cons 0 "LINE,ARC,LWPOLYLINE") (cons 8 validlisttotal)))) (setq ssvalid (acet-ss-union (list ssvalid1 ssvalid2))) Works like a charm!
    2 points
  3. Best to use the Logical Operators shown in lee mac's website to create one selection set like Steven says. While afralisp also works I don't like to use counters so here is the foreach way. (setq SS (ssget "_X" (list (cons 0 "INSERT") (cons 8 validlisttotal) (cons 2 validlisttotalblocks)))) ;was missing ) on (cons 0 INSERT (setq SS1 (ssget "_X" (list (cons 0 "LINE,ARC,LWPOLYLINE") (cons 8 validlisttotal)))) ;use a diffrent selection set name (foreach ent (mapcar 'cadr (ssnamex SS1)) ;builds a list of entity names from selection set ss1 (ssadd ent ss) ;adds each entity from ss1 to ss )
    1 point
  4. Maybe this will help, http://lee-mac.com/ssget.html, looking towards the bottom and the 'or' option, you want to select entities that are blocks OR lines (use the description in the AND box above for a good example, changing it to OR of course) If your code is working nicely though a bit long, not changing anything that works (always good...) this https://www.afralisp.net/autolisp/tutorials/selection-sets.php has a description of how to add 2 existing selection sets together (about 2/3 of the way down the page, creating a 'union' between selection sets). Not sure what happens if an entity is in both sets, probably will exist twice in the new selection set and be processed twice subsequently.
    1 point
  5. Yeah, those are weirdly made Mtext objects. Here's the contents of the top one: (1 . "{\\Fstandard|c134;X9\\Fstandard|c0;2\\Fstandard|c134;/\\Fstandard|c0;5\\Fstandard|c134;S}") So every letter is put in a different style for some reason. And this causes Explode to explode it to all separate letters
    1 point
  6. Try un formatting first then explode. https://www.cadtutor.net/forum/topic/73909-mtext-height-vs-text-formatting-height-need-to-change-all-to-a-different-height/
    1 point
  7. As I said in my 1st post check outside of Autocad, Windows Devices and Printers check that the default printer settings are set to a A3 not A4 the default will over ride Autocad sometimes.
    1 point
×
×
  • Create New...