CADWarrior Posted June 26, 2018 Posted June 26, 2018 Hey guys haven't been on here in a while. Need some help. I am stumped on this one. (check) Find All Drawings (check) Find All Blocks in each drawing (check) Find attributes in each block (horrible vla-get-tagstring names e.g. a block with 6 tags named Rev, * or - makes it difficult to find what you are looking for. (check) Use coordinates to find correct attribute assignment (rev1 is with in this rectangle based on scale) (check) Insert new title block with good vla-get-tagstring names and append found attributes (check) Use attsync to update attribute information. (stab repeatedly) tab to next drawing to find attsync doesn't work on multiple drawings. (stab repeatedly) tried to use vla-sendcommand to use attsync on multiple drawings resulting in fatal error So, my question is how do I use attsync on multiple docs via vlax? (defun c:NEWTB ( / ) (vl-load-com) (vlax-for doc (vla-get-documents (vlax-get-acad-object)) (setq dblock nil) (setq dblock2 nil) (setq selection nil) (setq dwgname (vla-get-name doc)) (setq dwglocation "C:\\TBB 2018.dwg") (princ (strcat "\n" dwgname " Started")) (setq ss (vla-add (vla-get-selectionsets doc) dwgname)) (setq filter_code (vlax-make-safearray vlax-vbinteger '(0 . 0))) (setq filter_value (vlax-make-safearray vlax-vbvariant '(0 . 0))) (vlax-safearray-fill filter_code '(0)) (vlax-safearray-fill filter_value '("INSERT")) (vla-select ss acSelectionSetAll nil nil filter_code filter_value) (vlax-for item ss (setq selection (cons (vlax-vla-object->ename item) selection))) (vla-delete ss) (foreach item selection (progn (if (wcmatch (vla-get-ObjectName (vlax-ename->vla-object item)) "*AcDbBlockReference*") (progn (setq block (vlax-ename->vla-object item)) (setq blockname (vla-get-effectivename block)) (if (and (equal :vlax-true (vla-get-hasattributes block)) (and (/= (wcmatch blockname "*TBB 2018*") t) (or (wcmatch blockname "*TBB*") (wcmatch blockname "*TBC*")))) (progn (setq blockscale (vla-get-xscalefactor block)) (setq blocation (vlax-safearray->list (vlax-Variant-Value (vla-get-insertionpoint block)))) (foreach attrib (vlax-safearray->list (vlax-Variant-Value (vla-getattributes block))) (setq location (vlax-safearray->list (vlax-Variant-Value (vla-get-insertionpoint attrib)))) (setq location (list (/ (- (nth 0 location) (nth 0 blocation)) blockscale)(/ (- (nth 1 location) (nth 1 blocation)) blockscale)(/ (- (nth 2 location) (nth 2 blocation)) blockscale))) (setq attribvalue (vla-get-textstring attrib)) (cond ((inside location (list 14.6666 0.3225 0.0) (list 15.6765 0.0 0.0))(setq DRAWINGNUMBER attribvalue)) ((inside location (list 15.6765 0.3492 0.0) (list 16.0049 0.2083 0.0))(setq SHEETX attribvalue)) ((inside location (list 15.6765 0.2083 0.0) (list 16.0049 0.0 0.0))(setq SHEETY attribvalue)) ((inside location (list 16.0049 0.3492 0.0) (list 16.3333 0.0 0.0))(setq REVISION attribvalue)) ((inside location (list 14.6666 0.7917 0.0) (list 16.3333 0.6042 0.0))(setq DWGDESCRIPTION1 attribvalue)) ((inside location (list 14.6666 0.6042 0.0) (list 16.3333 0.4167 0.0))(setq DWGDESCRIPTION2 attribvalue)) ((inside location (list 15.0824 1.0417 0.0) (list 15.4991 0.9583 0.0))(setq SCALE attribvalue)) ((inside location (list 15.0824 0.9583 0.0) (list 15.4991 0.875 0.0))(setq DRAWN attribvalue)) ((inside location (list 14.6667 1.1917 0.0) (list 14.8011 1.1083 0.0))(setq REV1 attribvalue)) ((inside location (list 14.6667 1.275 0.0) (list 14.8011 1.1917 0.0))(setq REV2 attribvalue)) ((inside location (list 14.6667 1.3583 0.0) (list 14.8011 1.275 0.0))(setq REV3 attribvalue)) ((inside location (list 14.6667 1.4417 0.0) (list 14.8011 1.3583 0.0))(setq REV4 attribvalue)) ((inside location (list 14.6667 1.525 0.0) (list 14.8011 1.4417 0.0))(setq REV5 attribvalue)) ((inside location (list 14.6667 1.6083 0.0) (list 14.8011 1.525 0.0))(setq REV6 attribvalue)) ) ) (vla-delete block) (setq block2 (vla-insertblock (vla-get-modelspace doc) (vlax-3d-point blocation) dwglocation blockscale blockscale blockscale 0.0)) (foreach attrib (vlax-safearray->list (vlax-Variant-Value (vla-getattributes block2))) (setq attribname (vla-get-tagstring attrib)) (princ (Strcat "\n" (vla-get-tagstring attrib))) (cond ((wcmatch attribname "*NUMBER*")(vla-put-textstring attrib (vl-string-subst "" ".DWG" (strcase (vla-get-name doc))))) ((wcmatch attribname "*X*")(vla-put-textstring attrib SHEETX)) ((wcmatch attribname "*Y*")(vla-put-textstring attrib SHEETY)) ((wcmatch attribname "*REVISION*")(vla-put-textstring attrib REVISION)) ((wcmatch attribname "*DESCRIPTION_1*")(vla-put-textstring attrib DWGDESCRIPTION1)) ((wcmatch attribname "*DESCRIPTION_2*")(vla-put-textstring attrib DWGDESCRIPTION2)) ((wcmatch attribname "*SCALE*")(vla-put-textstring attrib SCALE)) ((wcmatch attribname "*DRAWN*")(vla-put-textstring attrib DRAWN)) ((wcmatch attribname "*REV1*")(vla-put-textstring attrib REV1)) ((wcmatch attribname "*REV2*")(vla-put-textstring attrib REV2)) ((wcmatch attribname "*REV3*")(vla-put-textstring attrib REV3)) ((wcmatch attribname "*REV4*")(vla-put-textstring attrib REV4)) ((wcmatch attribname "*REV5*") (vla-put-textstring attrib REV5)) ((wcmatch attribname "*REV6*") (vla-put-textstring attrib REV6)) ) (vla-update attrib) ) ) ) ) ) ) ) ;;force @#$%@#$%@#$% title block to update not working ;;(vla-SendCommand doc (strcat "attsync n * ")) ;; attsync works on 1 drawing (vla-regen doc acAllViewports) ) ) (defun inside (coord topleft botright / ) (setq x1 (nth 0 topleft)) (setq x2 (nth 0 coord)) (setq x3 (nth 0 botright)) (setq y1 (nth 1 topleft)) (setq y2 (nth 1 coord)) (setq y3 (nth 1 botright)) (and (or (<= x1 x2 x3)(>= x1 x2 x3))(or(<= y1 y2 y3)(>= y1 y2 y3))) ) Quote
BIGAL Posted June 27, 2018 Posted June 27, 2018 Pretty easy using a script it can open close your dwgs and run a lisp. You will need to change the code you posted a bit removing dwg name. I wont go into how make the script using lisp but rather accept that you have a list of dwgs already. You would save the lisp in a support directory so it can be found simply. Open dwg1 (Load "Newtitle") close Y Open dwg2 (Load "Newtitle") close Y Open dwg3 (Load "Newtitle") close Y Version 2 you have already autoloaded Newtitle.lsp Open dwg1 (c:newtb) close Y Open dwg2 (c:newtb) close Y Open dwg3 (c:newtb) close Y Quote
rlx Posted June 27, 2018 Posted June 27, 2018 Not sure it will work in your case but sometimes I delete an object (block) and then undelete it to fix alignment issues. Quote
hanhphuc Posted June 27, 2018 Posted June 27, 2018 So, my question is how do I use attsync on multiple docs via vlax? hi, prefer batch as BIGAL suggested, enjoy your coffee another test, but it only updates after switching each drawing, or [Ctrl+Tab] (vlax-for doc (vla-get-documents (vlax-get-acad-object)) (vla-SendCommand doc "([color="blue"]vl-cmdf[/color] \"_ATTSYNC\" \"N\" \"*\") ") ) Quote
CADWarrior Posted June 27, 2018 Author Posted June 27, 2018 @hanhphuc Each time I attempted to use that command autocad, being autocad, switched active drawings on me. Which as we all know is bad while running an active lisp. (Threw a fatal error each attempt.) @rlx I attempted your suggestion to no avail. Deleted the block and used undo to bring it back with no change. (Attribute text still left aligned and not centered like it should be) @BIGAL I must admit I am not versed in the ways of Batch fu. Can batch files know where to find the current .dwg dir and import a list of .dwg files or can a .lsp send that information to a .bat file? I don't have multiple files types interact with each other often. e.g. blah\blah\blah\blah\current project\drawings\acad\temp 1.dwg blah\blah\blah\blah\current project\drawings\acad\temp 2.dwg blah\blah\blah\blah\current project\drawings\acad\temp 3.dwg Quote
rlx Posted June 27, 2018 Posted June 27, 2018 Correct me if I'm wrong , you have multiple drawings with a bad titleblock and want to replace it with a good one. So if you have a routine that works on one drawing , it should work on all drawings. So you would write a script file that loads your command (lisp file), runs the lisp file and save the drawing. Then all you you need is a way to select the folder with the patients and write a master script file that loads every drawing and runs the smaller script. It is probably also possible to do this with odbx etc but without one or a couple of test drawings this would be difficult. I have a script program , Lee has his scriptwriter , Bigal has also a very efficient way just using dos commands so give an example and I'm sure a solution will be born... Quote
hanhphuc Posted June 27, 2018 Posted June 27, 2018 off topic: In a vb example, the 'For Each' 'drawing.activate' method no issue, but in lisp 'vlax-for' 'vla-activate' doesn't work as expected. blah\blah\blah\blah\current project\drawings\acad\temp 1.dwg blah\blah\blah\blah\current project\drawings\acad\temp 2.dwg blah\blah\blah\blah\current project\drawings\acad\temp 3.dwg (setq lst ([color="blue"]vl-directory-files[/color] (acet-ui-pickdir) "*.dwg" 1)) BIGAL just shared his idea, create your "attsync.scr" (foreach [color="red"]x[/color] lst (write-line (strcat [color="purple"]"Open "[/color] [color="red"]x[/color] [color="purple"]" (vl-cmdf \"_ATTSYNC\" \"N\" \"*\") Close Y"[/color]) [color="red"]f[/color]) ) @rlx agree Lee has script goodies Quote
rlx Posted June 27, 2018 Posted June 27, 2018 Advantage of vba or .net whatever is that those languages see the autocad application as an object where lisp can only see the active drawing as an object. Wrote a vba script utility many years ago but since vba was not included standard with autocad anymore since autocad xx haven't done any vba anymore so don't know any vba anymore... i am just curious though why need attsync in the first place? when you insert a new block any attrib will be in the correct place. Unless you also want to copy attribute properties and attsync resets those props? well .... Quote
BIGAL Posted June 28, 2018 Posted June 28, 2018 Having a bad day posted how to make a script and its gone. Wrote it around (setq lst (vl-directory-files (acet-ui-pickdir) "*.dwg" 1)) thanks Hanhphuc. I desperately need to make movies, For this task may be 4 minutes to make script and type SCRIPT. There is a simple method using WORD to do the edits to make script, been using it for like 30 years. I will do some research and make a movie. Have a look at Lee-mac.com for his script writer. Quote
CADWarrior Posted June 28, 2018 Author Posted June 28, 2018 Sorry guys haven't had time to try out your batch/script file idea. @rlx the title block I import is blank. The attributes are set to be center justified but with no text the textalignmentpoint is set to the insertionpoint making a centered justified text look left aligned while still being center justified without attsync. I will post an example of what happens when I get to work today. Quote
rlx Posted June 28, 2018 Posted June 28, 2018 Sorry guys haven't had time to try out your batch/script file idea.@rlx the title block I import is blank. The attributes are set to be center justified but with no text the textalignmentpoint is set to the insertionpoint making a centered justified text look left aligned while still being center justified without attsync. I will post an example of what happens when I get to work today. maybe solution at bottom of this link can work for you : https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attsync-and-battman-not-working/td-p/7751096 Quote
CADWarrior Posted June 28, 2018 Author Posted June 28, 2018 @rlx when DGRL uses (if (= name (vla-get-Name blk))(command "_.ATTSYNC" "_Name" name)) Attsync only works on an active document level when he gets the block name it inserts it into command. @BIGAL and everyone, your talk of these batch files helped me think of a solution. I want to replace all the title block anyhow so why worry about user input and just have the script run itself when opened. (defun TB2018 ( / dblock dblock2 selection DRAWINGNUMBER SHEETX SHEETY REVISION DWGDESCRIPTION1 DWGDESCRIPTION2 SCALE DRAWN CHECKED DATE FILENO PLOT REV1 REVDESCRIPTION1 REVAPPROVAL1 REVDATE1 REV2 REVDESCRIPTION2 REVAPPROVAL2 REVDATE2 REV3 REVDESCRIPTION3 REVAPPROVAL3 REVDATE3 REV4 REVDESCRIPTION4 REVAPPROVAL4 REVDATE4 REV5 REVDESCRIPTION5 REVAPPROVAL5 REVDATE5 REV6 REVDESCRIPTION6 REVAPPROVAL6 REVDATE6 PROJECTDESCRIPTION1 PROJECTDESCRIPTION2) (vl-load-com) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (setq dwgname (vla-get-name doc)) (if (wcmatch (strcase (getvar "dwgprefix")) "*CLIENT NAME*") (progn (setq dwglocation "\\\\CLIENT NAME\\TB 2018.dwg") (princ (strcat "\n" dwgname " Started")) (setq ss (vla-add (vla-get-selectionsets doc) dwgname)) (setq filter_code (vlax-make-safearray vlax-vbinteger '(0 . 0))) (setq filter_value (vlax-make-safearray vlax-vbvariant '(0 . 0))) (vlax-safearray-fill filter_code '(0)) (vlax-safearray-fill filter_value '("INSERT")) (vla-select ss acSelectionSetAll nil nil filter_code filter_value) (vlax-for item ss (setq selection (cons (vlax-vla-object->ename item) selection))) (vla-delete ss) (foreach item selection (progn (if (wcmatch (vla-get-ObjectName (vlax-ename->vla-object item)) "*AcDbBlockReference*") (progn (setq block (vlax-ename->vla-object item)) (setq blockname (vla-get-effectivename block)) (if (and (equal :vlax-true (vla-get-hasattributes block)) (and (/= (wcmatch blockname "*TBB 2018*") t) (or (wcmatch blockname "*TBB*") (wcmatch blockname "*TBC*")))) (progn (setq blockscale (vla-get-xscalefactor block)) (setq blocation (vlax-safearray->list (vlax-Variant-Value (vla-get-insertionpoint block)))) (foreach attrib (vlax-safearray->list (vlax-Variant-Value (vla-getattributes block))) (setq location (vlax-safearray->list (vlax-Variant-Value (vla-get-insertionpoint attrib)))) (setq location (list (/ (- (nth 0 location) (nth 0 blocation)) blockscale)(/ (- (nth 1 location) (nth 1 blocation)) blockscale)(/ (- (nth 2 location) (nth 2 blocation)) blockscale))) (setq attribvalue (vla-get-textstring attrib)) (cond ((inside location (list 14.6666 0.3225 0.0) (list 15.6765 0.0 0.0))(setq DRAWINGNUMBER attribvalue)) ((inside location (list 15.6765 0.3492 0.0) (list 16.0049 0.2083 0.0))(setq SHEETX attribvalue)) ((inside location (list 15.6765 0.2083 0.0) (list 16.0049 0.0 0.0))(setq SHEETY attribvalue)) ((inside location (list 16.0049 0.3492 0.0) (list 16.3333 0.0 0.0))(setq REVISION attribvalue)) ((inside location (list 14.6666 0.7917 0.0) (list 16.3333 0.6042 0.0))(setq DWGDESCRIPTION1 attribvalue)) ((inside location (list 14.6666 0.6042 0.0) (list 16.3333 0.4167 0.0))(setq DWGDESCRIPTION2 attribvalue)) ((inside location (list 15.0824 1.0417 0.0) (list 15.4991 0.9583 0.0))(setq SCALE attribvalue)) ((inside location (list 15.0824 0.9583 0.0) (list 15.4991 0.875 0.0))(setq DRAWN attribvalue)) ((inside location (list 15.0824 0.875 0.0) (list 15.4991 0.7917 0.0))(setq CHECKED attribvalue)) ((inside location (list 15.9158 1.0417 0.0) (list 16.3333 0.9583 0.0))(setq DATE attribvalue)) ((inside location (list 15.9158 0.9583 0.0) (list 16.3333 0.875 0.0))(setq FILENO attribvalue)) ((inside location (list 15.9158 0.875 0.0) (list 16.3333 0.7917 0.0))(setq PLOT attribvalue)) ((inside location (list 14.6667 1.1917 0.0) (list 14.8011 1.1083 0.0))(setq REV1 attribvalue)) ((inside location (list 14.8011 1.1917 0.0) (list 15.6666 1.1083 0.0))(setq REVDESCRIPTION1 attribvalue)) ((inside location (list 15.6666 1.1917 0.0) (list 16.0 1.1083 0.0))(setq REVAPPROVAL1 attribvalue)) ((inside location (list 16.0 1.1917 0.0) (list 16.3333 1.1083 0.0))(setq REVDATE1 attribvalue)) ((inside location (list 14.6667 1.275 0.0) (list 14.8011 1.1917 0.0))(setq REV2 attribvalue)) ((inside location (list 14.8011 1.275 0.0) (list 15.6666 1.1917 0.0))(setq REVDESCRIPTION2 attribvalue)) ((inside location (list 15.6666 1.275 0.0) (list 16.0 1.1917 0.0))(setq REVAPPROVAL2 attribvalue)) ((inside location (list 16.0 1.275 0.0) (list 16.3333 1.1917 0.0))(setq REVDATE2 attribvalue)) ((inside location (list 14.6667 1.3583 0.0) (list 14.8011 1.275 0.0))(setq REV3 attribvalue)) ((inside location (list 14.8011 1.3583 0.0) (list 15.6666 1.275 0.0))(setq REVDESCRIPTION3 attribvalue)) ((inside location (list 15.6666 1.3583 0.0) (list 16.0 1.275 0.0))(setq REVAPPROVAL3 attribvalue)) ((inside location (list 16.0 1.3583 0.0) (list 16.3333 1.275 0.0))(setq REVDATE3 attribvalue)) ((inside location (list 14.6667 1.4417 0.0) (list 14.8011 1.3583 0.0))(setq REV4 attribvalue)) ((inside location (list 14.8011 1.4417 0.0) (list 15.6666 1.3583 0.0))(setq REVDESCRIPTION4 attribvalue)) ((inside location (list 15.6666 1.4417 0.0) (list 16.0 1.3583 0.0))(setq REVAPPROVAL4 attribvalue)) ((inside location (list 16.0 1.4417 0.0) (list 16.3333 1.3583 0.0))(setq REVDATE4 attribvalue)) ((inside location (list 14.6667 1.525 0.0) (list 14.8011 1.4417 0.0))(setq REV5 attribvalue)) ((inside location (list 14.8011 1.525 0.0) (list 15.6666 1.4417 0.0))(setq REVDESCRIPTION5 attribvalue)) ((inside location (list 15.6666 1.525 0.0) (list 16.0 1.4417 0.0))(setq REVAPPROVAL5 attribvalue)) ((inside location (list 16.0 1.525 0.0) (list 16.3333 1.4417 0.0))(setq REVDATE5 attribvalue)) ((inside location (list 14.6667 1.6083 0.0) (list 14.8011 1.525 0.0))(setq REV6 attribvalue)) ((inside location (list 14.8011 1.6083 0.0) (list 15.6666 1.525 0.0))(setq REVDESCRIPTION6 attribvalue)) ((inside location (list 15.6666 1.6083 0.0) (list 16.0 1.525 0.0))(setq REVAPPROVAL6 attribvalue)) ((inside location (list 16.0 1.6083 0.0) (list 16.3333 1.525 0.0))(setq REVDATE6 attribvalue)) ((inside location (list 14.6666 2.822 0.0) (list 16.3333 2.6889 0.0))(setq PROJECTDESCRIPTION1 attribvalue)) ((inside location (list 14.6666 2.6889 0.0) (list 16.3333 2.5144 0.0))(setq PROJECTDESCRIPTION2 attribvalue)) ) ) (vla-delete block) (setq block2 (vla-insertblock (vla-get-modelspace doc) (vlax-3d-point blocation) dwglocation blockscale blockscale blockscale 0.0)) (foreach attrib (vlax-safearray->list (vlax-Variant-Value (vla-getattributes block2))) (setq attribname (vla-get-tagstring attrib)) (cond ((wcmatch attribname "*NUMBER*")(vla-put-textstring attrib DRAWINGNUMBER)) ((wcmatch attribname "*X*")(vla-put-textstring attrib SHEETX)) ((wcmatch attribname "*Y*")(vla-put-textstring attrib SHEETY)) ((wcmatch attribname "*REV_LEVEL*")(vla-put-textstring attrib REVISION)) ((wcmatch attribname "*DESCRIPTION_1*")(vla-put-textstring attrib DWGDESCRIPTION1)) ((wcmatch attribname "*DESCRIPTION_2*")(vla-put-textstring attrib DWGDESCRIPTION2)) ((wcmatch attribname "*SCALE*")(vla-put-textstring attrib SCALE)) ((wcmatch attribname "*DRAWN*")(vla-put-textstring attrib DRAWN)) ((wcmatch attribname "*CHECKED*")(vla-put-textstring attrib CHECKED)) ((wcmatch attribname "DATE")(vla-put-textstring attrib DATE)) ((wcmatch attribname "*FILE*")(vla-put-textstring attrib FILENO)) ((wcmatch attribname "*PLOT*")(vla-put-textstring attrib PLOT)) ((wcmatch attribname "*REV_1*")(vla-put-textstring attrib REV1)) ((wcmatch attribname "*DESC_1*")(vla-put-textstring attrib REVDESCRIPTION1)) ((wcmatch attribname "*APPR_1*")(vla-put-textstring attrib REVAPPROVAL1)) ((wcmatch attribname "*DATE2_1*")(vla-put-textstring attrib REVDATE1)) ((wcmatch attribname "*REV_2*")(vla-put-textstring attrib REV2)) ((wcmatch attribname "*DESC_2*")(vla-put-textstring attrib REVDESCRIPTION2)) ((wcmatch attribname "*APPR_2*")(vla-put-textstring attrib REVAPPROVAL2)) ((wcmatch attribname "*DATE2_2*")(vla-put-textstring attrib REVDATE2)) ((wcmatch attribname "*REV_3*")(vla-put-textstring attrib REV3)) ((wcmatch attribname "*DESC_3*")(vla-put-textstring attrib REVDESCRIPTION3)) ((wcmatch attribname "*APPR_3*")(vla-put-textstring attrib REVAPPROVAL3)) ((wcmatch attribname "*DATE2_3*")(vla-put-textstring attrib REVDATE3)) ((wcmatch attribname "*REV_4*")(vla-put-textstring attrib REV4)) ((wcmatch attribname "*DESC_4*") (vla-put-textstring attrib REVDESCRIPTION4)) ((wcmatch attribname "*APPR_4*") (vla-put-textstring attrib REVAPPROVAL4)) ((wcmatch attribname "*DATE2_4*") (vla-put-textstring attrib REVDATE4)) ((wcmatch attribname "*REV_5*") (vla-put-textstring attrib REV5)) ((wcmatch attribname "*DESC_5*")(vla-put-textstring attrib REVDESCRIPTION5)) ((wcmatch attribname "*APPR_5*") (vla-put-textstring attrib REVAPPROVAL5)) ((wcmatch attribname "*DATE2_5*") (vla-put-textstring attrib REVDATE5)) ((wcmatch attribname "*REV_6*") (vla-put-textstring attrib REV6)) ((wcmatch attribname "*DESC_6*") (vla-put-textstring attrib REVDESCRIPTION6)) ((wcmatch attribname "*APPR_6*") (vla-put-textstring attrib REVAPPROVAL6)) ((wcmatch attribname "*DATE2_6*") (vla-put-textstring attrib REVDATE6)) ((wcmatch attribname "*PROJECT_TITLE_1*") (vla-put-textstring attrib PROJECTDESCRIPTION1)) ((wcmatch attribname "*PROJECT_TITLE_2*") (vla-put-textstring attrib PROJECTDESCRIPTION2)) ) (vla-update attrib) ) ) ) ) ) ) ) (vl-cmdf "_ATTSYNC" "N" "*") (vla-regen doc acAllViewports) ) ) ) (defun inside (coord topleft botright / ) (setq x1 (nth 0 topleft)) (setq x2 (nth 0 coord)) (setq x3 (nth 0 botright)) (setq y1 (nth 1 topleft)) (setq y2 (nth 1 coord)) (setq y3 (nth 1 botright)) (and (or (<= x1 x2 x3)(>= x1 x2 x3))(or(<= y1 y2 y3)(>= y1 y2 y3))) ) (TB2018) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.