Jump to content

Leaderboard

Popular Content

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

  1. With a lot of persistence and luck I figured out what I was looking for. Here's the solution: (entmakex '( (0 . "STYLE") (100 . "AcDbSymbolTableRecord") (100 . "AcDbTextStyleTableRecord") (2 . "My TEXT") (70 . 0) (40 . 0.09375) (41 . 1.0) (50 . 0.0) (71 . 0) (42 . 0.0) (3 . "romans.shx") (4 . "") (-3 ("AcadAnnotative" ;; This block makes the style annotative (1000 . "AnnotativeData") (1002 . "{") (1070 . 1) (1070 . 1) ;; 0 is off, 1 is on (1002 . "}") ) ;; end of the annotative block ("AcadAnnoPO";; And these 3 lines turn on the text orientation match (1070 . 1) ) ;; end of orientation block ) ))
    2 points
  2. Nice, I might copy this sometime!
    1 point
  3. Thanks Steven. I'll give that a shot on Monday. I've this mapped to a keyboard shortcut with Ctrl+L (Bit handier ;). I've all my Quick select lisps starting with QS then the auto fill kicks in to populate the command list. QSL.. Are all my layer functions, QSH... are hatches and so on.
    1 point
  4. So to speed up what you have you want to make the repeat loop more efficient. Just quick testing, it looks like you can just use: (setq lst (vl-list* "," (cdr (assoc 8 (entget (ssname ss1 (setq idx (1- idx)))))) lst)) taking away the 'if' line, might make it a little quicker. Also for me, I'd make the name something more snappy like QSQ - saves half a second of typing!
    1 point
  5. This is a good reference, http://www.lee-mac.com/tutorials.html#lisptutorials , You'll also need to look here for a sub function LM:burstsel (always a good plan to link where routines are posted): http://lee-mac.com/upgradedburst.html To give a better answer for you, 'I never used script' - do you need a tutorial on creating a script or LISP from nothing, or do you know somethings and just need a bit of guidance for AutoCAD scripts in particular? If you want to use what dan20047 offered as a LISP routine you might want to make it into one, something like: (defun c:boks ( / ) ;Burst OverKill Save ;;Burst all ojects (LM:burstsel (ssget "X") T) ;;http://lee-mac.com/upgradedburst.html ;;Overkill command (command "overkill" "all" "" "") ;; repeat as many times as required depending on complexity of nesting (repeat 3 ;; 3 repeats (command "PURGE" "A" "*" "N") ) ;;save as DXF (command "saveas" "dxf" "v" "r12" "16" (strcat (getvar "dwgname") "_r12")) ) ; end function -EDIT- Should have called this routine BOSs - Burst OverKill Save s, D'Oh!
    1 point
  6. You can only get so much quality with a raster. I used to use Ghostscript and ImageMagick for PDF creation and manipulation, free and opensource.
    1 point
  7. You can use script files to combine lisp & command calls. (Not fully tested, just to give the idea.) Syntax based on Bricscad V15 prompts. (LM:burstsel (ssget "X") T) ;make sure burst lisp has been loaded (command "overkill" "all" "" "") ;; repeat as many times as required depending on complexity of nesting _.purge all * n _.purge all * n _.purge all * n (command "saveas" "dxf" "v" "r12" "16" (strcat (getvar "dwgname") "_r12"))
    1 point
  8. @codrut81, Making what? Data from?, please upload your sample.dwg and data file before and after
    1 point
  9. My code above matches colors as well as gradients
    1 point
  10. @leonucadomi Give this a try: (defun c:foo (/ a b e h hp p x) ;; RJP » 2022-09-08 (cond ((and (setq e (car (entsel "\nPick source hatch: "))) (= "HATCH" (cdr (assoc 0 (entget e)))) (setq b (assoc 2 (entget e))) (setq e (vlax-ename->vla-object e)) (setq a (mapcar '(lambda (x) (list x (vlax-get e x))) '(associativehatch backgroundcolor elevation entitytransparency gradientangle gradientcentered gradientcolor1 gradientcolor2 gradientname hatchobjecttype hatchstyle isopenwidth layer linetype linetypescale lineweight material origin patternangle patterndouble patternscale patternspace plotstylename truecolor visible ) ) ) ) (setq hp (getvar 'hpname)) (setvar 'hpname (cdr b)) (while (setq p (getpoint)) (setq h (entlast)) (command "_.bhatch" p "") (cond ((not (equal h (setq h (entlast)))) (setq h (vlax-ename->vla-object h)) (foreach x a (vl-catch-all-apply 'vlax-put (list h (car x) (cadr x)))) ;; patternname (RO) cannot be set via vla for some reason ? ;; (setq h (entget (vlax-vla-object->ename h))) ;; (entmod (subst b (assoc 2 h) h)) ) ) ) (setvar 'hpname hp) ) ) (princ) )
    1 point
×
×
  • Create New...