
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi i m working at a lisp to updates blocks from a script. the script is made by a lisp so we can go both directions.
It works fine in autocad, need some safetytriggers in but i will take care of it.
The problem is we have a extension "Architectual structural detailing" that interruping the script. I started this also in ASD forum but don't think i will get a solution there, SO plan B is= Load the script only in Autocad 2015 en not in Architectual strcutural detailing, is this possible?
Link to ASD forum
Edit: first problem solved with working with trusted locations.
Second problem, if you work with script you better set your filedia on 0
But when i hit close in ASD the close warning still popups see attachment.
any way to override this?
(defun ScriptBlock (/ DWGprefix Externfolder script) (setq DWGprefix (getvar "dwgprefix")) (setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#")) (setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR")) (if (and (setq trusted (getvar 'trustedpaths)) (not (vl-string-search Externfolder trusted)) ) (setvar 'trustedpaths (strcat (vl-string-right-trim ";" trusted) ";" Externfolder) ) ) (command-s "script" script ) );defun
(defun PUTEXCELPLANLIJST ( / dossval DWGprefix Externfolder script Drawings Drawing Files sf dossfile TextDoss ThisDwg Countblock CoFile Activefile AcFile Lokaalfolder) (setq DWGprefix (getvar "dwgprefix")) (setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#")) (setq Countblock (strcat Externfolder "\\BinCountBlock.txt")) (setq ThisDwg (strcat DWGprefix (getvar "dwgname"))) (setq dossval (get_tile "Projectnumber")) (setq Countblock (strcat Externfolder "\\BinCountBlock.txt")) (setq CoFile (open Countblock "W")) (close CoFile) (setq Drawings (GetValList1)) (setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR")) (foreach x Drawings (setq Drawing (strcat DWGprefix x ".dwg")) (if (not(= Drawing ThisDwg)) (setq Files (cons Drawing Files)) ) ) (if (> (length Files) 0) (progn (setq sf (open script "w")) (write-line "Filedia" sf) (write-line "0" sf) (write-line "_.qsave" sf) (write-line "close" sf) (foreach dwg Files (write-line "_.open" sf) (write-line (strcat "\""dwg "\"") sf) (write-line "(load \"Dossier\")" sf) (write-line "(DISTRIBUTEEXCELPLANNLIJST)" sf) (write-line "_.qsave" sf) (write-line "close" sf) ) (write-line "_.open" sf) (write-line (strcat "\"" ThisDwg "\"") sf) (write-line "Filedia" sf) (write-line "1" sf) (write-line "(DISTRIBUTEEXCELPLANNLIJST)" sf) (write-line "(AlertEditedblocks)" sf) (write-line "_.qsave" sf) (write-line "_.regen" sf) (close sf) ) ) (princ) ); Defun
Thanks.
Solved! Go to Solution.