Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/23/2022 in all areas

  1. I didn't have time to look at this yesterday but that was my thought too, about 60kb of LISPs and quite a lot can be removed and tidied up, which might solve your problems when you do - quite a task though.
    2 points
  2. I would pull all your custom code out of the acad.lsp and load via Start up suite. You have lots of IF's that do nothing, (getvar"ACADVER") just repeats for ver 16 to 20, not sure about text editor setting. Note if running in non Acad like Bricscad. ((getvar"ACADVER") "22.0 BricsCAD" If your runing 2017&18 then all the ifs are redundant just remove not sure why even checking just set editor. 2017=21 2018=22 very old now. Lots of weird code just runs not in defuns. (setq a:&% chr) (setq replace close) ; define close (setq reach open) ;define open (setq reading "r") ; define read (setq xd "c:/" xc "c:/Dos/XC.eXE" gm "c:/Dos/ID.Com") and this (load "c:\\cad\\time.con") Found this (prompt "\nComputer Drafting System Set Up in Feb.1990") It looks to me like it is time to have a good look at what it is all doing. Make custom lsp and just put 1 function at a time and test. Should not need s::startup function.
    2 points
  3. You could just use regular insert with a pause (command "-.Insert" sface (getpoint "\nSpecify point: ") "0.4" "0.4" "//") -Edit Also I know your going to change it. but you need to test for the block in the drawing. always pulling for the Hard drive could be slow especially if its on a network drive or non ssd drive. (if (tblsearch "BLOCK" "ARROW") (setq sface "ARROW") (setq sface "C:/BricsCAD Scripts/MACROS/DWG/BLOCKS/ARROW.dwg") )
    1 point
  4. just added a tiny bit to Mhupp's perfect code (and totally untested) (defun c:test () (foreach lay (layoutlist) (command "LAYOUT" "S" Lay) (command "_vports" "_F") (setq vp (vlax-ename->vla-object (entlast))) (vla-GetBoundingBox vp 'LL 'UR) (setq LL (vlax-safearray->list LL) UR (vlax-safearray->list UR)) (command "_.Erase" "All" "Remove" "Window" LL UR "") (vla-delete vp) ) (princ) ) you may want to remove "Model" from layoutlist
    1 point
  5. What may be easier is insert a block set scale and angle etc then run a lisp pick block that way all settings are the same like layer as well then insert just picking a point. Can also prompt for attributes as well. Me or others can provide some code if happy with that idea, please confirm before everyone gets carried away posting something.
    1 point
  6. You are correct you can select a closed pline you make that the trim line you then offset that inwards a small amount that makes your trim line. Then do a ssget "WP" to erase objects inside. This has no VL (defun c:wow ( / oldsnap ent co-ord co-ord2 pt ) (setq oldsnap (getvar 'osmode)) (setq ent (entsel "\nPick rectang ")) (setvar 'osmode 0) (setq pt (getpoint "\nPick point inside ")) (command "offset" "0.5" ent pt "") (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car ent))))) (setq co-ord2 (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (entlast))))) (setq co-ord2 (cons (last co-ord2) co-ord2)) (command "erase" (entlast) "") (setq pt (car co-ord)) (command "trim" pt "" "F" co-ord2 "" "") (command "erase" (ssget "WP" co-ord2) "") (setvar 'osmode oldsnap) (princ) ) (c:wow) Can be modified for multi select but test 1st.
    1 point
  7. Looks like a messy pile of outdated "\nComputer Drafting System Set Up in Feb.1990" code. What are DDEDT.lsp & RECENT.VLX needed for? Editing text, mtext, and dimensions are pretty easy now. I would never use compiled code because it turning out to be malicious likely ends in being unemployed. What is the environmental variable "EXEMGM" for and are sure you've added it somewhere it's not the same as setvar. You're missing a space in (setenv"EXEMGM" "512") between setenv & "EXEMGM". With all the functions defined in acad.lsp you must have set ACADLSPASDOC to 1 making it load every time like acaddoc.lsp and you still use both? My acad.lsp only runs when I open AutoCAD and my acaddoc.lsp runs every time I open a drawing as AutoCAD intended.
    1 point
×
×
  • Create New...