Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/15/2019 in all areas

  1. Search for acad.pgp, one with UserDataCache in the path should be original unedited version. it should contain: ; Examples of external commands for command windows DEL, DEL, 8,File to delete: , DIR, DIR, 8,File specification: , SH, , 1,*OS Command: , SHELL, , 1,*OS Command: , START, START, 1,*Application to start: , TYPE, TYPE, 8,File to list: , ; Examples of external commands for Windows ; See also the (STARTAPP) AutoLISP function for an alternative method. EXPLORER, START EXPLORER, 1,, NOTEPAD, START NOTEPAD, 1,*File to edit: , PBRUSH, START PBRUSH, 1,, Sounds like some of this has been modified. Safest way to modify Command Aliases and Shell Commands is with the ALIASEDIT Express Tool command by clicking "Command Aliases" from the Express Tools tab in the ribbon where they can easily be added or removed.
    1 point
  2. That generally means the price you pay, and the price that I pay, and the price that the next person pays, are all different.
    1 point
  3. Lokesh, have a look at Cutecad http://www.cutecad.com/Default.aspx They have plugins for Gaskets and Nesting and are an Atom partner.
    1 point
  4. Hi, Something like this? (defun c:Test (/ int cnt sel ent get bks lws lst len) ;; Tharwat - Date: 14.Oct.2019 ;; (and (or *gapdis* (setq *gapdis* 1.0)) (or (initget 6) (setq *gapdis* (cond ((getdist (strcat "\nSpecify maximum gap distance between blocks and polylines <" (vl-princ-to-string *gapdis*) "> :" ) ) ) (*gapdis*) ) ) ) (princ "\nSelect Blocks & Polylines : ") (setq int -1 cnt 0 sel (ssget "_:L" '((0 . "LWPOLYLINE,INSERT"))) ) (while (setq int (1+ int) ent (ssname sel int) ) (or (and (= (cdr (assoc 0 (setq get (entget ent)))) "INSERT") (setq bks (cons get bks)) ) (setq lws (cons ent lws)) ) ) (mapcar '(lambda (w) (mapcar '(lambda (b / p) (and (setq lst b) (or (< (setq len (distance (vlax-curve-getclosestpointto w (setq p (cdr (assoc 10 b)))) p) ) *gapdis* ) (equal len *gapdis* 1e-4) ) (setq cnt (1+ cnt)) (setq bks (vl-remove lst bks)) ) ) bks ) ) lws ) (and bks (foreach bk bks (entdel (cdr (assoc -1 bk))))) ) (princ (strcat "\nNumber of blocks retained [ " (if (< 0 cnt) (itoa cnt) "None") " ].")) (princ) ) (vl-load-com)
    1 point
  5. While you're waiting, consider that this isn't some magic portal where you ask for something for free and it's delivered to you with a flash of smoke.....
    1 point
  6. Thanks CHULFENG I have the paths plus a few other items all sorted when you have to build around 20 autocad per year need shortcuts. (vlax-dump-object (vla-get-files (vla-get-preferences (vlax-get-Acad-object)))) will give list of properties. A couple worth adding Acadtemp is my dump directory (vla-put-TempFilePath *files* "C:\\AcadTemp\\") (vla-put-PlotLogFilePath *files* "C:\\AcadTemp\\") (vla-put-LogFilePath *files* "C:\\AcadTemp\\")
    1 point
  7. Per the documentation, there is a DXF group 11 entry for every vertex of the MLINE, as such, you can use a 'massoc' function to retrieve the coordinates of all vertices, e.g.: (massoc 11 <dxf data>)
    1 point
  8. Interesting to use a batch file through shell. I'll have to keep that in mind. At our company, there is a master lisp routine that loads where we can add tidbits as necessary. One small portion adds the support paths for FONTS, TRUSTED PATHS, and PLOTTER/PEN settings. Here's how I worked through that: (defun TrustedPath (/ AcadObject PrefsObject TabNameObject SupPath TrustPath) (vl-load-com) (setq AcadObject (vlax-get-acad-object)) (setq PrefsObject (vlax-get-property AcadObject 'Preferences)) ;store a reference to Preferences (Preferences object) (setq TabNameObject (vlax-get-property PrefsObject 'Files)) ;Store a reference to the Files (Files Object) (setq SupPath (strcase (vlax-get-property TabNameObject 'SupportPath)) ) ;get the existing support path (CAPS) ;; check for FONTS (if (not (vl-string-search "K:\\FONTS" SupPath)) (progn (princ "\nFonts are not listed in Support Path") (setq SupPath (strcat SupPath ";" "K:\\fonts")) ;; Update the path (vlax-put-property TabNameObject 'SupportPath SupPath) (alert " The FONTS in your support path did not include K:\Fonts. \n\t\tI have added the support path. \n\tPlease close all AutoCAD sessions and re-open." ) ) ;end progn ;;else (princ "\nCheck - Fonts are pathed.") ) ;end if ;;; Directories for Trusted Paths (defun check (str) (if (not (vl-string-search str (strcase (getvar "trustedpaths"))) ) (setvar "trustedpaths" (strcat (getvar "trustedpaths") ";" str ";") ) ) ) (mapcar 'check '("K:\\..." "U:\\CHUCK\\LISP" "U:\\CHUCK\\LISP\\..." ) ) (princ "\nTrusted paths checked... Loaded as necessary.") ;;; Directories for Plotter configurations and pen settings (setq SupPath (strcase (vlax-get-property TabNameObject 'PrinterConfigPath) ) ) (if (not (vl-string-search "ACAD2018 PLOTTING" SupPath) ) (progn (princ "\nPrinter configuration path loading...") (setq SupPath (strcat SupPath ";" "K:\\Plotting;") ) ;; Update the path (vlax-put-property TabNameObject 'PrinterConfigPath SupPath) ) ;end progn ) ;end if (setq SupPath (strcase (vlax-get-property TabNameObject 'PrinterDescPath)) ) (if (not (vl-string-search "ACAD2018 PLOTTING" SupPath) ) (progn (princ "\nPrinter description path loading...") (setq SupPath (strcat SupPath ";" "K:\\Plotting;") ) ;; Update the path (vlax-put-property TabNameObject 'PrinterDescPath SupPath) ) ;end progn ) ;end if (setq SupPath (strcase (vlax-get-property TabNameObject 'PrinterStyleSheetPath) ) ) (if (not (vl-string-search "ACAD2018 PLOTTING" SupPath) ) (progn (princ "\nPlot style table path loading...") (setq SupPath (strcat SupPath ";" "K:\\Plotting;") ) ;; Update the path (vlax-put-property TabNameObject 'PrinterStyleSheetPath SupPath ) ) ;end progn ) ;end if ;;; Directory for Autosave Path (if (not (= (strcase (getvar "savefilepath")) "C:\\ACAD-AUTOSAVE") ) (progn (setvar "savefilepath" "C:\\ACAD-AUTOSAVE") (princ "\nAutosave path checked... Changed as necessary.") ) ) (princ) ) ; end TrustedPath The hardest part of this task was getting the correct property names.
    1 point
×
×
  • Create New...