Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/07/2024 in all areas

  1. a radio row or column doesn't have a key (nor does it need a height). Also a new radio column doesn't mean you can start recycling key names. I understand you want to save the planet by recycling but my advise would be to recycle your mother-in-law or something / somebody (foreach str '( "ed : edit_box { alignment = left; width = 25; edit_width = 10; fixed_width = true;}" "" "dgmsynt : dialog { spacer; key = \"dcl\";" " : boxed_radio_column {label = \"TITLE1\";" " : radio_button { height = 1.0; width = 25; is_tab_stop = true;" " key = \"radio_button01\"; label = \"1. OPTION1\";" " }" " : radio_button { height = 1.0; width = 25; is_tab_stop = true;" " key = \"radio_button02\"; label = \"2. OPTION2\";" " }" " : radio_button { height = 1.0; width = 25; is_tab_stop = true;" " key = \"radio_button03\"; label = \"3. OPTION3\";" " }" " }" " : boxed_radio_column {label = \"TITLE2\";" " : radio_button { height = 1.0; width = 25; is_tab_stop = true;" " key = \"radio_button04\"; label = \"1. OPTION4\";" " }" " : radio_button { height = 1.0; width = 25; is_tab_stop = true;" " key = \"radio_button05\"; label = \"2. OPTION5\";" " }" " }" " ok_only;" "}" ) (write-line str des) )
    1 point
  2. Looks like advertising to me. I have already posted links to FREE AutoCAD apps that do everything directly in AutoCAD.
    1 point
  3. Also, another cheat, but this time very quick generation of pattern... This version uses dot approximation of line entities... Hatch pattern is somewhat smaller (51 points per line - instead of previously 481 lines per 247 line each)... If you zoom only too much, you can see dots, but if you are with zoomings like 4x4 rectangular boundary - you'll see sign of superman like it was drawn linearily... So here is mod. of Lanny Schiele code : ;;;CADALYST 10/05 Tip 2065: HatchMaker.lsp Hatch Maker (c) 2005 Larry Schiele ;;;* ====== B E G I N C O D E N O W ====== ;;;* HatchMaker.lsp written by Lanny Schiele at TMI Systems Design Corporation ;;;* Lanny.Schiele@tmisystems.com ;;;* Tested on AutoCAD 2002 & 2006. -- does include a 'VL' function -- should work on Acad2000 on up. ;;; ;;;* Modified by M.R. to make hatchings with points that follow lines to make hatchings acceptable for rectangular boundary. (defun C:SaveHatch-rectangle ( / round dxf ListToFile SelSet SelSetSize ssNth fuzz Ent EntInfo EntType pt1 pt2 Dist a DeltaX DeltaY DimZin lw minp maxp ww hh pt k n dx ) ;;;* BEGIN NESTED FUNCTIONS (defun round (num) (if (>= (- num (fix num)) 0.5) (fix (1+ num)) (fix num) ) ) (defun dxf (code EnameOrElist / VarType) (setq VarType (type EnameOrElist)) (if (= VarType (read "ENAME")) (cdr (assoc code (entget EnameOrElist))) (cdr (assoc code EnameOrElist)) ) ) (defun ListToFile (TextList FileName DoOpenWithNotepad AsAppend / TextItem File RetVal) (if (setq File (open FileName (if AsAppend "a" "w"))) (progn (foreach TextItem TextList (write-line TextItem File) ) (setq File (close File)) (if DoOpenWithNotepad (startapp "notepad" FileName) ) ) ) (FindFile FileName) ) (textscr) (getstring "\nHit [ENTER] to continue...") (princ "\nSelect pattern of lines and/or points for new hatch pattern along with bounding lwpolyline boundary...") (while (not (setq SelSet (ssget (list (cons -4 "<or") (cons 0 "LINE,POINT") (cons -4 "<and") (cons 0 "LWPOLYLINE") (cons 90 4) (cons -4 "&=") (cons 70 1) (cons -4 "<not") (cons -4 "<>") (cons 42 0.0) (cons -4 "not>") (cons -4 "and>") (cons -4 "or>")))))) (initget 6) (setq fuzz (cond ( (getdist "\nPick or specify fuzz distance between 2 adjacent points <0.005> : ") ) (0.005))) (foreach o (vl-remove-if (function listp) (mapcar (function cadr) (ssnamex SelSet))) (if (= (cdr (assoc 0 (entget o))) "LWPOLYLINE") (setq lw o) ) ) (ssdel lw SelSet) (vla-getboundingbox (vlax-ename->vla-object lw) (quote minp) (quote maxp)) (mapcar (function set) (list (quote minp) (quote maxp)) (mapcar (function safearray-value) (list minp maxp))) (setq ww (- (car maxp) (car minp)) hh (- (cadr maxp) (cadr minp))) (setq ssNth 0 SelSetSize (sslength SelSet) DimZin (getvar "DIMZIN") ) (setvar "DIMZIN" 11) (if (> SelSetSize 0) (princ "\nAnalyaing entities...") ) (while (< ssNth SelSetSize) (setq Ent (ssname SelSet ssNth) EntInfo (entget Ent) EntType (dxf 0 EntInfo) ssNth (+ ssNth 1) ) (cond ( (= EntType "POINT") (setq pt1 (dxf 10 EntInfo) FileLine (strcat "0," (rtos (car pt1) 2 8) "," (rtos (cadr pt1) 2 8) "," (rtos ww 2 8) "," (rtos hh 2 8) ",0,-" (rtos ww 2 8)) ) (princ (strcat "\n" FileLine)) (setq FileLines (cons FileLine FileLines)) ) ( (= EntType "LINE") (setq pt1 (dxf 10 EntInfo) pt2 (dxf 11 EntInfo) Dist (distance pt1 pt2) a (angle pt1 pt2) ) (setq n (fix (/ Dist fuzz))) (if (= n 0) (setq n 1) ) (setq dx (/ Dist n)) (setq k -1) (repeat (1+ n) (setq k (1+ k)) (setq pt (polar pt1 a (* dx k))) (setq FileLine (strcat "0," (rtos (car pt) 2 8) "," (rtos (cadr pt) 2 8) "," (rtos ww 2 8) "," (rtos hh 2 8) ",0,-" (rtos ww 2 8))) (setq FileLines (cons FileLine FileLines)) ) ) ( (princ (strcat "\n * * * Invalid entity " EntType " omitted.")) ) ) ) (setvar "DIMZIN" DimZin) (if (and FileLines (setq HatchDescr (getstring T "\nBriefly describe this hatch pattern: ")) (setq FileName (getfiled "Hatch Pattern File" (strcat (getvar (quote roamablerootprefix)) "support\\") "pat" 1)) ) (progn (if (= HatchDescr "") (setq HatchDescr "Custom hatch pattern") ) (setq HatchName (vl-filename-base FileName) FileLines (cons (strcat "*" HatchName "," HatchDescr) (reverse FileLines)) ) (princ "\n============================================================") (princ (strcat "\nPlease wait while the hatch file is created...\n")) (ListToFile FileLines FileName nil nil) (while (not (findfile FileName))) ; (vl-cmdf "delay" 1500) ; delay required so file can be created and found (silly, but req.) (if (findfile FileName) (princ (strcat "\nHatch pattern '" HatchName "' is ready to use!")) (progn (princ "\nUnable to create hatch pattern file:") (princ (strcat "\n " FileName)) ) ) ) (princ (if FileLines "\nCancelled." "\nUnable to create hatch pattern from selected entities.")) ) (princ) ) ;| (princ "\n ************************************************************** ") (princ "\n** **") (princ "\n* HatchMaker.lsp written by Lanny Schiele -- enjoy! *") (princ "\n* *") (princ "\n* Type in DRAWHATCH to have the environment created to draw. *") (princ "\n* Type in SAVEHATCH to save the pattern you created. *") (princ "\n** **") (princ "\n ************************************************************** ") (princ) |; sups-rec-hatched-4x4.dwg sups-rec.pat
    1 point
  4. well of course it opens a dialog, (setq dwg (getfiled "" fnPath "" 8)) , getfiled is get file dialog If your filename is : fnPath (strcat folderPath "/" fn ".dwg") either skip the getfiled-part or replace it with something like : (and (setq sel objSS) (setq dwg (findfile fnPath)))
    1 point
  5. I was looking for the original on Cadalyst, but this appears to be an update to that one. Make a New Linetype with Text Here is the latest on Cadalyst. There is another out there called LtFly.
    1 point
  6. oh, found a function of Lee Mac that does exactly what i want.
    1 point
×
×
  • Create New...