Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/20/2019 in all areas

  1. Hi Guys, I Wanted To Mass Convert Some DWGs To DXFs, So, I looked Around and found some commercial softwares and also some lisp routine, but they didn't workout as i expected so i made a software (to interpret scripts). it works fine in converion of dxfs, so i thought this software might be usefull to some who want to mass convert dxfs, here is the software: AutoCAD Script Writer.zip This Software doesn't Require Installation, (It Runs Directly) ::REQUIREMENTS:: 1. AutoCAD which supports LISP routines (eG; full versions of AutoCAD 2010, But not AutoCAD LT Versions) ::Usage:: 1. In The "Location Of Files To Be Processed" Box, Paste The Location Where U have ur dwg files. (Default value is "D:\SomeFolder"). Dont Give A Root Location Such As "D:\" or "C:\" etc; 2. In The "Command" Box, The Default Code Is Written For DXF Conversion, U can modify and write ur own Macros here, (If U know Acad Scripting Language) 3. Pressing the "Create Script" Button will create a "Script.scr" file at the location of the dwg files 4. Now Open AutoCAD, Now Press [Control]+[N] In AutoCAD, A New Window will be opened 5. Now All U Have To Do Is Drag The "Script.scr", into the AutoCAD's Canvas (which is a blank black window usually) 6. And thats it, autocad will start converting the DWGs to DXFs Thanks To Lee-Mac, dbroada & Bill-Tillman for giving me the answer and idea to my previous post,
    1 point
  2. Two answers HERE too @rlx Like the (/ (+ num 5) 8) Much simpler than my solution !
    1 point
  3. (defun c:t1 ( / doc spc ss obj-ss txt-ins txt-str num blk-num bo) (vl-load-com) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)) spc (vla-get-block (vla-get-activelayout doc))) (defun getip (o) (if (= (vla-get-alignment o) 0)(vla-get-InsertionPoint o)(vla-get-TextAlignmentPoint o))) (defun wai (blk tag val) (setq tag (strcase tag)) (if blk (vl-some '(lambda (x)(if (= tag (strcase (vla-get-tagstring x))) (progn (vla-put-textstring x val) val)))(vlax-invoke blk 'getattributes)))) (cond ((not (tblsearch "block" "highlighter")) (alert "Block 'highlighter' not found in drawing")) ((not (setq ss (ssget "X" '((0 . "TEXT"))))) (alert "No texts found to process")) (T (vlax-for txt-obj (setq obj-ss (vla-get-ActiveSelectionSet doc)) (setq txt-ins (getip txt-obj) txt-str (strcase (vla-get-textstring txt-obj))) (if (and (wcmatch txt-str "*#A*") (setq i (vl-string-position (ascii "A") txt-str)) (setq num (atoi (substr txt-str 1 i))) (> num 5) (setq blk-num (/ (+ num 5) 8)) (setq bo (vla-insertblock spc txt-ins "highlighter" 1 1 1 0))) (wai bo "QUANTIDADE" (itoa blk-num)))))) (if obj-ss (vl-catch-all-apply 'vlax-release-object (list obj-ss))) (vla-regen doc acActiveViewport) (princ) )
    1 point
×
×
  • Create New...