Jump to content

Leaderboard

  1. Lee Mac

    Lee Mac

    Trusted Members


    • Points

      16

    • Content Count

      20,115


  2. BIGAL

    BIGAL

    Trusted Members


    • Points

      15

    • Content Count

      11,514


  3. ReMark

    ReMark

    Trusted Members


    • Points

      11

    • Content Count

      45,411


  4. Roy_043

    Roy_043

    Community Members


    • Points

      10

    • Content Count

      859



Popular Content

Showing content with the highest reputation since 06/18/2019 in all areas

  1. 2 points
    Just an update on the situation. It looks like the site is the target of a bot attack, which is continuing. However, I'm putting some defences in place that should start to take effect over the next 24 hours.
  2. 2 points
    You're most welcome! Prior to evaluating the PEDIT command I assign the last primary entity in the drawing database to the symbol ent using the entlast function. Then, after calling the PEDIT command, I test whether the value held by the symbol ent points to the same entity as that returned by entlast (and I redefine the ent symbol at the same time). If the entity is the same, this indicates that the PEDIT command has not added any entities to the drawing database and has hence failed to generate a new polyline; as such, the test expression for the if statement is only validated if these entities differ with the new entity assigned to ent being the new polyline generated by the PEDIT command.
  3. 2 points
    So company policy is dont buy something that may improve company production and improve profit Hint search here triangulation.
  4. 2 points
    Try the code below. Note 1: I haven't fully tested the code. I cannot run utmgeo.VLX as I use BricsCAD instead of AutoCAD. Also I would probably need a sample dwg with the highlighter block inserted in a 'feasible' location. If you have the source of the VLX and such a dwg please post them. Note 2: The highlighter block has to already be inserted before calling the SvUpdate command. (vl-load-com) (defun KGA_Sys_Apply (expr varLst / ret) (if (not (vl-catch-all-error-p (setq ret (vl-catch-all-apply expr varLst)))) ret ) ) (defun KGA_Sys_ApplyAlt (expr varLst) (not (vl-catch-all-error-p (vl-catch-all-apply expr varLst))) ) ; (SvUpdate_Browser "https://www.cadtutor.net/forum/forum/15-autolisp-visual-lisp-amp-dcl/") (defun SvUpdate_Browser (url) (if (or (and *SvUpdate_browser* (KGA_Sys_ApplyAlt 'vlax-get-property (list *SvUpdate_browser* 'visible)) ; Check if object is still available. (princ "\nUpdating StreetView in browser ") ) (and (princ "\nStarting StreetView in browser. Please wait... ") (or (setq *SvUpdate_browser* (KGA_Sys_Apply 'vlax-get-or-create-object '("internetexplorer.application"))) (prompt "\nError: Internet Explorer cannot be started ") ) (progn (setvar 'cmdecho 0) (command "_.delay" 2000) (setvar 'cmdecho 1) ) ) ) (progn (vlax-put-property *SvUpdate_browser* 'visible :vlax-true) (vlax-invoke-method *SvUpdate_browser* 'navigate url) ) ) ) (defun SvUpdate_CallBackModified (obj rea lst / pt) (if (and (vlax-read-enabled-p obj) (not (equal (vlr-data rea) (setq pt (vlax-get obj 'insertionpoint)) 1e-8)) ; Perhaps higher fuzz? ) (progn ; (print "SvUpdate_CallBackModified") (vlr-data-set rea pt) (SvUpdate_Move pt) ) ) ) (defun SvUpdate_Move (pt) (setq pt (utmgeo pt 6378160.0 298.25 18 "N")) (SvUpdate_Browser (strcat "https://www.google.com/maps?ie=UTF8&layer=c&cbll=" (rtos (cadr pt) 2 8) "," (rtos (car pt) 2 8) "&cbp=1,0,,0,5&z=16" ) ) ) (defun c:SvUpdate ( / obj pt ss) (if (and (or (setq ss (ssget "_X" '((2 . "highlighter")))) (prompt "\nError: 'highlighter' block not found ") ) (or (= 1 (sslength ss)) (prompt "\nError: more than 1 'highlighter' block found ") ) ) (progn (if *SvUpdate_objectReactor* (vlr-remove *SvUpdate_objectReactor*) ) (setq *SvUpdate_objectReactor* (vlr-object-reactor (list (setq obj (vlax-ename->vla-object (ssname ss 0)))) (setq pt (vlax-get obj 'insertionpoint)) ; Reactor data. '( (:vlr-modified . SvUpdate_CallBackModified) ) ) ) (SvUpdate_Move pt) ) ) (princ) )
  5. 2 points
    I would suggest the following: (defun c:blockprops ( / blk def ent enx idx lst sel ) (if (setq sel (ssget '((0 . "INSERT")))) (progn (repeat (setq idx (sslength sel)) (setq idx (1- idx) blk (LM:name->effectivename (cdr (assoc 2 (entget (ssname sel idx))))) ) (or (member blk lst) (setq lst (cons blk lst))) ) (while (setq def (tblnext "block" (not def))) (if (member (LM:name->effectivename (setq blk (cdr (assoc 2 def)))) lst) (progn (setq ent (tblobjname "block" blk)) (while (setq ent (entnext ent)) (entmod (append (entget ent) (if (= "HATCH" (cdr (assoc 0 enx))) '((8 . "0") (62 . 000)) '((8 . "0") (62 . 256)) ) ) ) ) ) ) ) (command "_.regen") ) ) (princ) ) ;; Block Name -> Effective Block Name - Lee Mac ;; blk - [str] Block name (defun LM:name->effectivename ( blk / rep ) (if (and (wcmatch blk "`**") (setq rep (cdadr (assoc -3 (entget (cdr (assoc 330 (entget (tblobjname "block" blk)))) '("AcDbBlockRepBTag") ) ) ) ) (setq rep (handent (cdr (assoc 1005 rep)))) ) (cdr (assoc 2 (entget rep))) blk ) ) (princ)
  6. 1 point
    ;;;;;;;;;;;;;;;;;;; ;; draw text object (defun Text (pt hgt str color) (entmakex (list (cons 0 "TEXT") (cons 10 pt) (cons 40 hgt) (cons 62 color) (cons 1 str))) ) ;;;;;;;;;;;;;;;;;;; (vl-load-com) (defun inserttable (lst pt / ht htc tab i j row tb acObj acDoc space) ;; settings, text height, cel height (setq ht 200) (setq htc 380) ;; document, model space, ... (setq acObj (vlax-get-acad-object) acDoc (vla-get-activedocument acObj) space (vlax-get acDoc (if (= 1 (getvar 'cvport)) 'PaperSpace 'ModelSpace)) ) (setq tab (vla-addtable space (vlax-3d-point pt) (length lst) (length (cadr lst)) (* 1.1 ht) (* 10.0 ht) )) ;; (vla-SetTextHeight tab 1 ht) (vla-SetTextHeight tab 2 ht) (vla-SetTextHeight tab 4 ht) (setq i 0) (repeat (length lst) ;; iterates the rows (vla-setrowHeight tab i htc) (setq row (nth i lst)) (setq j 0) (repeat (length row) ;; iterates the cols in the row (princ "\n") (princ (nth j row)) (vla-SetText tab i j (nth j row) ) (setq j (+ j 1)) ) (setq i (+ i 1)) ) ;; default Autocad expects a totle row. If the first row has more than 1 cel, let's unmerge this row (if (> (length (nth 0 lst)) 1) (vla-unMergeCells tab 0 0 0 0) ) tab ) ;; Offset for each Circle Center (defun c:occ ( / lst ss bp pt i ip radi) ;; select circles (princ "\nSelect circles then press enter: ") (setq ss (ssget (list (cons 0 "CIRCLE")))) (setq bp (getpoint "\nBase point for offset: ")) (setq pt (getpoint "\nInsert point of the table: ")) ;; make the list (setq lst (list (list "Core#" "x" "y") ;; head )) (setq i 0) (repeat (sslength ss) (setq ip (cdr (assoc 10 (entget (ssname ss i))))) ;; circle center (setq radi (cdr (assoc 40 (entget (ssname ss i))))) ;; circle radius (so we know where to put the label) ;; append the list (setq lst (append lst (list (list (+ i 1) ;; 1-based counter, Core# (rtos (car ip) 2 2) ;; 2 decimals, feel free to change this (rtos (cadr ip) 2 2) ) ))) (Text (list (+ (nth 0 ip) radi) (- (nth 1 ip) radi) ) 200 (strcat "Core " (itoa (+ i 1))) 160 ;; blue ) (setq i (+ i 1)) ) (inserttable lst pt) )
  7. 1 point
    You're generous .. I wouldn't let them explode my blocks!
  8. 1 point
    A few days late on reading this. Looks like it's already been resolved, but I also have this one lying around. It works, but a little TOO well in my opinion. Just fyi. AD-Automatic Dimension Autocad.LSP
  9. 1 point
    Hi All, apologies for the late reply, I've been away on holiday this week and tried to stay offline, so only just catching up. It looks as though there has been some sort of event this week; the server has seen a massive increase in http requests but traffic and bandwidth have remained stable. It's possible that it was some sort of attack but I'm still investigating. The server isn't quite back to normal but nothing like the level seen in the first half of last week. I'm keeping my eye on it for now and will report back. Thanks all for reporting this incident and apologies for the inconvenience.
  10. 1 point
    many thanks. I will try it out
  11. 1 point
    >> Why does my selection set only work on the first block and does not run on the others? Because of this: (setq ss (ssname ss i)) What you're doing, is overwriting ss. ss used to be your whole selection, but the instant you execute this line of code ss now means the first block. You should put this in another variable. for example: (setq blk (ssname ss i)) (LM:vl-SetAttributeValue (vlax-ename->vla-object blk) "tag" "value") Also ... "tag" "value", this is weird. This means the value "value" gets set. What you want is (LM:vl-SetAttributeValue (vlax-ename->vla-object blk) tag value) This means the value "ITEM1", or "ITEM2" ... gets set. Also, DEMO doesn't do what you want it to do. But I'll stop here, for now.
  12. 1 point
    (defun C:incoord (/ pc) (setq pc (getpoint "\nClick on the point: ")) (while pc (##InsTextCoord pc) (setq pc (getpoint "\nNext Point [Or <Enter> to end]: ")) ) (princ) ) (defun ##InsTextCoord (ponto / px py pz) (setq px (car ponto)) (setq py (cadr ponto)) (setq pz (caddr ponto)) (command ".text" ponto "" "" (strcat "X= " (rtos px) ", Y= " (rtos py) ", Z= " (rtos pz) )) ) (princ "\n INCOORD to start") (princ)
  13. 1 point
    Once you select an option this will continuously allow you to keep picking points until you hit Enter or Spacebar. (defun c:enz (/ clr key pnt a b c) ;; Tharwat - 5.Jul.2019 ;; (load "enz.lsp") enz ;; https://www.cadtutor.net/forum/topic/68126-require-lisp-3-in-1-for-xyz-coordinates-with-leader/?tab=comments#comment-552639 ;; Add Commas ;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/1-000-comma-separator/m-p/1857166#M230806 ;; Code Source: John Uhden ;; This function pads a numeric string with commas. ;; Arguments: ;; num = any number, real or integer (>= 0) ;; # = precision, integer (>= 0) ;; (defun rtoc (num # / p#) (setq num (rtos num 2 #) # 1) (while (and (/= (substr num # 1) ".")(<= # (strlen num))) (setq # (1+ #)) ) (setq # (1- #) p# #) (if (= (setq # (rem # 3)) 0)(setq # 3)) (while (< # p#) (setq num (strcat (substr num 1 #) "," (substr num (1+ #))) # (+ 4 #) p# (1+ p#) ) ) num ) (setq clr (getvar 'clayer)) ; from dlanorh's code (cond ( (null (tblsearch "LAYER" "Coor Text")) (command "-layer" "_M" "Coor Text" "_C" 7 "" "")) (t (setvar 'clayer "Coor Text"))) (and (or (initget "NoZ All Z") (setq key (cond ((getkword "\nPick your go [No Elevation , All Coordinates , Z coordinates only] [NoZ/All/Z] < NoZ > :" ) ) ("NoZ") ) ) ) (setq pnt (getpoint "\nSpecify base point : ")) (setq dim (getvar 'DIMZIN)) (setvar 'DIMZIN 0) (while pnt (mapcar 'set '(a b c) (mapcar '(lambda (k p) (strcat k (rtoc p 4))) '("E=" "N=" "Z=") pnt ) ) (setvar 'DIMZIN dim) (command "_.LEADER" "_none" pnt "\\" "" (nth (vl-position key '("NoZ" "All" "Z")) (list (strcat a "\\P" b) (strcat a "\\P" b "\\P" c) c) ) "" ) (setq pnt (getpoint "\nSpecify base point : ")) ) ; while ) (setvar 'clayer clr) (princ) )
  14. 1 point
    Start list is one variable. Final list is 4 variables. I think it's impossible to convert quite right you want. (setq lst '(("n1" 74678.6 53741.6 0.0) ("n2" 74683.8 53741.6 0.0) ("n3" 74683.8 53747.6 0.0) ("n4" 74677.6 53747.6 0.0))) (mapcar (function (lambda(x)(cons (read (car x)) (cdr x)))) lst)) ;; returns : '((N1 74678.6 53741.6 0.0) (N2 74683.8 53741.6 0.0) (N3 74683.8 53747.6 0.0) (N4 74677.6 53747.6 0.0)) ;; using nth, foreach, mapcar etc you can get access to any element of list
  15. 1 point
    Hint search here (Cadtutor) triangulation.
  16. 1 point
    Tharwat's code with slight modifications in my later post.
  17. 1 point
    (defun c:test ( / e i j m n p s ) (if (setq s (ssget '((0 . "LWPOLYLINE")))) (repeat (setq i (sslength s)) (setq e (ssname s (setq i (1- i))) n (cdr (assoc 210 (entget e))) m (vlax-curve-getendparam e) j -1 ) (while (<= (setq j (1+ j)) m) (setq p (trans (vlax-curve-getpointatparam e j) 0 e)) (entmakex (list (cons 0 "TEXT") (cons 7 (getvar 'TEXTSTYLE)) (cons 40 (getvar 'TEXTSIZE)) (cons 10 p) (cons 11 p) (cons 72 1) (cons 73 2) (cons 1 (itoa (1+ j))) (cons 210 n) ) ) ) ) ) (princ) )
  18. 1 point
    https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/someone-help-me-draw-an-arc-at-conner/m-p/8134145/highlight/true#M371342
  19. 1 point
    The suggestion is good a couple of changes put the two getpoint into a while so you can repeat. ; pick a point and make a leader ; by Alan H July 2019 (defun C:cxy ( / pt1 pt2 ans txtx txty txtz oldlay) (command "-layer" "m" "Co-ordinates" "c" 1 "Co-ordinates" "") (setq oldlay (getvar 'clayer)) (setvar 'clayer "Co-ordinates") (if (not AH:Butts)(load "Multi Radio buttons.lsp")) (if (= but nil)(setq but 1)) (setq ans (ah:butts but "V" '("Please choose" "E-N" "E-N-Z" "Z"))) (setvar "cmdecho" 0) (while (setq pt1 (getpoint "\nPick point for co-ordinate: ")) (setq pt2 (getpoint pt1 "\nPick point for text: ")) (if pt2 (progn (setq txtx (strcat "E= " (rtos (car pt1) 2 3) )) (setq txty (strcat "N= " (rtos (cadr pt1) 2 3) )) (setq txtz (strcat "Z= " (rtos (caddr pt1) 2 3) )) (princ "\n") (cond ((= ans "E-N")(command "leader" pt1 pt2 "Annotation" txtx txty "")) ((= ans "E-N-Z")(command "leader" pt1 pt2 "Annotation" txtx txty txtz "")) ((= ans "Z")(command "leader" pt1 pt2 "Annotation" txtz "")) ) ) ) ) (setvar 'clayer oldlay) (princ) ) (c:cxy) . Multi radio buttons.lsp
  20. 1 point
  21. 1 point

    Version 1.7.0

    9 downloads

    This program will calculate the total length of Lines/Polylines/LWPolylines/Arcs/Ellipses/Circles/Splines with an optional filter. The Filter may be used to select only those lines that are on a certain layer, or perhaps have a certain linetype or colour. The results of the calculation can be displayed in an ACAD Table within the drawing, or written to either a CSV or TXT File. The Table-Style may be selected from the drop-down in the main dialog. Main interface The main dialogue box allows the user to filter lines by layer, linetype or colour and select the table style. Multiple selected items can filtered. A filter string may be entered to help the user quickly find the filter items that he/she requires. Options The options dialogue box allows the user to specify which object types should be included and the type of output, table in the drawing, CSV file or TXT file. Demo Function Syntax: LenCal For instructions on how to run the program see here. Any comments, criticism and suggestions are welcome. Either PM me directly, or reply to the original thread.
  22. 1 point
    Try the following: (defun c:lpr ( / e g p q ) (while (not (progn (setvar 'errno 0) (setq e (entsel)) (cond ( (= 7 (getvar 'errno)) (prompt "\nMissed, try again.") ) ( (null e)) ( (vl-catch-all-error-p (vl-catch-all-apply 'vlax-curve-getclosestpointto e)) (prompt "\nInvalid object selected.") ) ( (setq e (car e)) (while (= 5 (car (setq g (grread t 13 0)))) (redraw) (if (setq q (vlax-curve-getclosestpointto e (trans (cadr g) 1 0) t)) (grdraw (cadr g) (trans q 0 1) 1) ) ) (if (= 3 (car g)) (progn (entmake (list '(0 . "LINE") (cons 10 (setq p (trans (cadr g) 1 0))) (cons 11 (setq q (vlax-curve-getclosestpointto e (trans (cadr g) 1 0) t))) ) ) (princ "\nLine endpoints: ") (princ p) (princ " | ") (princ q) (princ "\nLength: ") (princ (distance p q)) ) t ) ) ) ) ) ) (redraw) (princ) )
  23. 1 point
    Steven P's method is probably the best. I plot to paper with a page setup set to Layout and to PDF with a page setup set to Extents with "Center the plot" checked. Not exactly the same, but close enough.
  24. 1 point
    Your code has several issues. But the cause of the problem lies in this part (reformatted); (cond ((= layrname "_Floor") (cond ((= tst "INSERT") (setq blockname (cdr (assoc 2 (entget (ssname sset ctr))))) ) ) ) ) (cond ((= "Direction Ref Point" blockname) ; This returns T for items after the "Direction Ref Point" block. (setq bpt (cdr (assoc 10 (entget (ssname sset ctr))))) ) ) The bpt variable gets updated with point data from items processed after the block. Consider this instead (note the use of 'and'): (if (and (= "_Floor" layrname) (= "INSERT" tst) (= "Direction Ref Point" (cdr (assoc 2 (entget (ssname sset ctr))))) ) (setq bpt (cdr (assoc 10 (entget (ssname sset ctr))))) )
  25. 1 point
    I don't know why you are trying a third party application instead of the suggestions for using publish correctly.
  26. 1 point
    Please note that there are two types of "closed" polylines. Consider a polyline that forms a closed shape square. It could have 4 defined vertices and the "c" option was used to close it or it could have 5 vertices where the first and last vertices have the same location. The following code will handle open polylines and polylines where the first and last vertex are the same with output per your latest posted request. It will not list the distance for a "closed" polyline where the first and last vertex are not the same but the closed parameter was used. ;POLYVERT - list coordinates of polyline vertices ; ;CAD Studio - www.cadstudio.cz www.cadforum.cz ; modified by lrm 6/27/2019 v4 ; (setq __PV_Delimiter " ") ; or ";" or (chr 9) (setq __PV_DP (getvar "LUPREC")) ; decimal places (command "-units" "" 2 "" "" "" "") (defun C:POLYVERT (/ ent listCOORDINATES PT1) (setq ent (entsel "\nPick POLYLINE to list vertices:")) (if (and ent (wcmatch (cdr (assoc 0 (entget (setq ent (car ent))))) "*POLYLINE" ) ;all types ) ;and (progn (setq listCOORDINATES (PolyVert ent)) ;make list (princ "\nVertex list (x y distance-from-previuos):") (setq pt0 (nth 0 listCOORDINATES) ptStart pt0 ) (foreach PT1 listCOORDINATES ;all vertices (setq d (distance pt0 pt1)) (if (/= pt0 PT1) (progn (princ (strcat "\n" (rtos (car pt0) 2 __PV_DP) __PV_Delimiter (rtos (cadr pt0) 2 __PV_DP) __PV_Delimiter (rtos d 2 __PV_DP) __PV_Delimiter ) ) display XYZ (setq pt0 pt1) ) ; progn ) ; end if ) ;for ; check if first and last vertex are the same (if (> (distance ptStart pt0) 0.001) (progn (princ (strcat "\n" (rtos (car pt0) 2 __PV_DP) __PV_Delimiter (rtos (cadr pt0 ) 2 __PV_DP ) __PV_Delimiter ) ) ) ; progn ) ) ;progn (princ " no polyline selected") ) ;if (princ) ) ; PolyVert ; returns vertices list for any type of polyline (in WCS coordinates) ; arg POLY: polyline to list (ename or vla-object) (defun PolyVert (POLY / par pt1 pt0 lst) (vl-load-com) (setq par (if (vlax-curve-isClosed POLY) (vlax-curve-getEndParam POLY) ; else (1+ (vlax-curve-getEndParam POLY)) ) ) (while (setq pt1 (vlax-curve-getPointAtParam POLY (setq par (- par 1)))) (setq lst (cons pt1 lst)) ) ) ; return lst (princ "\nPOLYVERT command loaded.") (princ)
  27. 1 point
    Exactly. I'm not so sure a "perpetual license" is the answer in today's tech world. How else do you drag people out of using the same version for decades? There are even people on this forum who are still on R14 and while they have heavily customized their software and they produce great things, they are the exception to the rule. It becomes the Microsoft IE6 story if software companies don't do something about it. A company buying a particular version of software and operating it for decades is very different than, say, a company buying equipment and operating it for decades. Software changes - and so does the hardware it's dependent upon. I appreciate the people who do choose to upgrade AutoCAD every year or few years but that's not the case with everyone. If you're on AutoCAD 2009 and earlier then you're not a serious AutoCAD user, with few exceptions (David Bethel for instance). -TZ
  28. 1 point
    I agree with named page setups all the way. Do it right once and it will work forever etc.
  29. 1 point
    Another colour tagged post for the list
  30. 1 point
    Thanks for those files. It works on my machine as well. Here is a new version of the code. The angle of the block is now translated to the heading in SV. The code assumes a (static) block containing an arrow pointing east. (vl-load-com) (defun KGA_Math_LimitAngleRange (ang) (rem (+ (rem ang (+ pi pi)) pi pi) (+ pi pi)) ) (defun KGA_Math_Rad_To_Dgr (rad) (* (/ rad pi) 180.0) ) (defun KGA_Sys_Apply (expr varLst / ret) (if (not (vl-catch-all-error-p (setq ret (vl-catch-all-apply expr varLst)))) ret ) ) (defun KGA_Sys_ApplyAlt (expr varLst) (not (vl-catch-all-error-p (vl-catch-all-apply expr varLst))) ) ; 20190626: Revised. ; 20190625 (defun SvUpdate_CallBackModified (obj rea lst / dat) (if (and (vlax-read-enabled-p obj) (setq dat (list (vlax-get obj 'insertionpoint) (vlax-get obj 'rotation) ) ) (not (equal dat (vlr-data rea) 1e-8)) ; Perhaps higher fuzz? ) (progn ; (print "SvUpdate_CallBackModified") (vlr-data-set rea dat) (SvUpdate_ChangeView (car dat) (cadr dat)) ) ) ) ; 20190626: Revised. ; 20190626: Renamed. ; 20190625 ; https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=48.857832,2.295226&heading=-45 (defun SvUpdate_ChangeView (pt ang) (setq pt (utmgeo pt 6378160.0 298.25 18 "N")) (setq ang (KGA_Math_Rad_To_Dgr (KGA_Math_LimitAngleRange (- (* 0.5 pi) ang)))) (princ "\nPlease wait... ") (SvUpdate_Navigate (strcat "https://www.google.com/maps/@?api=1" "&map_action=" "pano" "&viewpoint=" (rtos (cadr pt) 2 8) "," (rtos (car pt) 2 8) "&heading=" (rtos ang 2 0) ) ) ) ; 20190626: Removed some prompts. ; 20190626: Renamed. ; 20190625 ; (SvUpdate_Navigate "https://www.cadtutor.net/forum/forum/15-autolisp-visual-lisp-amp-dcl/") (defun SvUpdate_Navigate (url) (if (or (and *SvUpdate_browser* (KGA_Sys_ApplyAlt 'vlax-get-property (list *SvUpdate_browser* 'visible)) ; Check if object is still available. ) (and (or (setq *SvUpdate_browser* (KGA_Sys_Apply 'vlax-get-or-create-object '("internetexplorer.application"))) (prompt "\nError: Internet Explorer cannot be started ") ) (progn (setvar 'cmdecho 0) (command "_.delay" 2000) (setvar 'cmdecho 1) ) ) ) (progn (vlax-put-property *SvUpdate_browser* 'visible :vlax-true) (vlax-invoke-method *SvUpdate_browser* 'navigate url) ) ) ) ; 20190626: Revised. ; 20190625 ; The selected (static) block should contain an arrow pointing east. (defun c:SvUpdate ( / dat enm obj) (if (and (setq enm (car (entsel))) (setq obj (vlax-ename->vla-object enm)) (or (= "AcDbBlockReference" (vla-get-objectname obj)) (prompt "\nError: this is not a block reference ") ) ) (progn (if *SvUpdate_objectReactor* (vlr-remove *SvUpdate_objectReactor*) ) (setq *SvUpdate_objectReactor* (vlr-object-reactor (list obj) (setq dat ; Reactor data. (list (vlax-get obj 'insertionpoint) (vlax-get obj 'rotation) ) ) '( (:vlr-modified . SvUpdate_CallBackModified) ) ) ) (SvUpdate_ChangeView (car dat) (cadr dat)) ) ) (princ) ) Sample_new.dwg
  31. 1 point
    I prefer 15" screen with 1920x1080. I have had both 17" and 15" models and there is little difference in screen size, but a huge difference in weight and compactness. I'm always on a docking station so it's not too often I am in "laptop mode" where I'm actually doing production. I will stay 15" for good now that I made the switch on my last laptop. -TZ
  32. 1 point
    Our color ctb has the 1st9 as black with various increasing thickness like old iso pens. The last few are greys as is, we have left the color as they are but just sort of know what works, all the colours are set to the same line weight 0.25. Yellow is the worst on white as mentioned, use 32 a nice Orange, some of the blues come out purplyish. Is that a word ? I have attached a sample we have around 5 different ctb's depending on the out put type fine for smll sheets a bit fatter for large sheets. Oh yeah the mono ctb you use the shift and drag over the pen settings to change colour lineweight etc dont do 1 at a time. DesignLaserCOLOUR.ctb
  33. 1 point
    A Display Name of $(if,$(and,1,$(getvar,ossnaphatch)),!.)OsnapHatch displays highlighted when on. Simple and easy alternative for displaying whether a system variable is On -vs- Off. For newer versions the proper macro would be ^P'setvar;osoptions;$M=$(if,$(and,1,$(getvar,osoptions)),$(-,$(getvar,osoptions),1),$(+,$(getvar,osoptions),1)) ^P with a Display Name of $(if,$(and,1,$(getvar,osoptions)),!.)OsnapHatch While OsnapHatch still works in 2019 it's hasn't been listed in help since before the 2015 versions.
  34. 1 point
    For Inventor I would recommend equivalent to an HP Zbook with a Core i7, and 16GB RAM minimum, with a high performance NVMe SSD drive. A Surface or any Tablet for that matter doesn't really suit the needs of 3D CAD design in a practical manner. -TZ
  35. 1 point
    Your biggest problem may be communicating with Chrome. When you run the Openlinkinchrome function multiple times are URLs opened in the same window? Or can you set a preference to accomplish this?
  36. 1 point
    (defun c:lpp (/ entity pt acExtendBoth ANG ENT1 ENT2 HT LEV LEVI LEVIM LEVIP LW NPTYY NPTYYM NPTYYP P PLL PP PP1 PTPMIN1 X19 Y19 YI YIP acExtendNone FEAT FEATUR FILE LST LW P XI) ERROR : acExtendBoth and acExtendNone are AutoCAD constants. You are defining them as local variables in the lisp so they are set to nil. This gives the error. Solution : Remove them from the local variable list.
  37. 1 point
    It's not a problem, it's publically posted code. Thanks to @Tharwat for an easier solution. Try the attached. cta.lsp
  38. 1 point
    Try to add to the lisp (vl-load-com)
  39. 1 point
    @dlanorh Just replace the vla-get-effectivename function with vla-get-name.
  40. 1 point
    With Shift key pressed while selecting the second segment with the FILLET command 0 radius will always be used no matter what FILLETRAD is set to. Easy peasy.
  41. 1 point
    If its lines or plines no arcs there is a mathematical formula for areas based on points. Arcs add an extra level of complexity. (coding by Autodesk) Autodesk pay mathmaticians no doubt a lot of money to make Autocad smart so you will never be told how they did it. Just google Boundary you will find lots of theory about boundaries.
  42. 1 point
    I modified some of the paper sizes to suit (I uses An Expand paper because I don't otherwise use the)... Go to page setup, select Dwg to PDF plotter and then properties Under 'Use-Defined Paper Sizes and Calibration' choose modify Standard Paper Sizes (though you can also go and create a Custom paper Size), and then choose the paper size in the box below, click modify and there you can set the margins, mine are set at 0. Click finish and then repeat for all the paper sies. I used the standard paper sizes since I use a plotting list - and it is easier to use if I use a standard paper size. Then when it comes to plotting, just choose your modified paper size
  43. 1 point
    For me that's 3D, anything that uses all 3 axis is 3D, solids are another thing altogether but there is such a thing as 2D solids in LT. I draw just about everything in 3D using LT. The big difference is the available tools included with LT, so it is a question of how much time you are willing to put into a drawing to get the results. LT does have the "hide" command so views with hidden line removal are also possible. All by it's self just using LT you can do a lot, but add in the power of Excel and you can do it quicker (if you don't count the weeks and months of programming ).
  44. 1 point
    The following outputs only the x and y followed by the distance from the previous point all with 2 decimal points. I think that is what you wanted. ;POLYVERT - list coordinates of polyline vertices ; ;CAD Studio - www.cadstudio.cz www.cadforum.cz ; (setq __PV_Delimiter " ") ; or ";" or (chr 9) (setq __PV_DP (getvar "LUPREC")) ; decimal places (command "-units" "" 2 "" "" "" "") (defun C:POLYVERT (/ ent listCOORDINATES PT1) (setq ent (entsel "\nPick POLYLINE to list vertices:")) (if (and ent (wcmatch (cdr (assoc 0 (entget (setq ent (car ent))))) "*POLYLINE" ) ;all types ) ;and (progn (setq listCOORDINATES (PolyVert ent)) ;make list (princ "\nVertex list (x y distance-from-previuos):") (setq pt0 (nth 0 listCOORDINATES)) (foreach PT1 listCOORDINATES ;all vertices (setq d (distance pt0 pt1)) (princ (strcat "\n" (rtos (car PT1) 2 __PV_DP) __PV_Delimiter (rtos (cadr PT1) 2 __PV_DP) __PV_Delimiter (rtos d 2 __PV_DP) __PV_Delimiter ) ) display XYZ (setq pt0 pt1) ) ;for ) ;progn (princ " no polyline selected") ) ;if (princ) ) ; PolyVert ; returns vertices list for any type of polyline (in WCS coordinates) ; arg POLY: polyline to list (ename or vla-object) (defun PolyVert (POLY / par pt1 lst) (vl-load-com) (setq par (if (vlax-curve-isClosed POLY) (vlax-curve-getEndParam POLY) ; else (1+ (vlax-curve-getEndParam POLY)) ) ) (while (setq pt1 (vlax-curve-getPointAtParam POLY (setq par (- par 1)))) (setq lst (cons pt1 lst)) ) ) ; return lst (princ "\nPOLYVERT command loaded.") (princ)
  45. 1 point
    I thought I pretty much explained how to do it in that very same post you reference. The center of the cul-de-sac is located using coordinates supplied in the project instructions which I believe are X=1421125.75 / Y=783525.60. The cul-de-sac has a radius of 50' and the streetline width is also 50' (again, from the instructions). The west streetline of SW 85th Avenue is 120' east of the subdivision boundary and it is also parallel to it. The east streetline would be parallel to the west streetline. The "short line at the center" is the centerline of the street and is located equidistant between the two streetlines meaning it is 25' from both (straight down the middle of the road). You should have been done with this project back in November. What happened, did you take a vacation or something?
  46. 1 point
    Just use revcloud and Object option again with the new arc length, click on the old revcloud. You should get a new revcloud with the new arc length, delete the old one. You might be able to automate this with a script or LISP.
  47. 1 point
    Oleson Village - Lots 6, 7, & 8. One slight correction. I forget the 23.06 property line in a previously posted image for lot #6. I circled it in the above image. The R.O.W. between lot #7 and SW Oleson Road should be 40 feet.
  48. 1 point
    GATTE 2 Global Attribute Edit with Layout Selection This small program works just like AutoCAD's GATTE express tool, with the extra option of choosing which layouts to apply attribute changes to. There are two versions of this program: Version 1 Command: GATTE2 ..is made in lisp and is loaded using these instructions. It uses CAB's Layout Select program to select which layouts you want. (Make sure you download and place LayoutSelect.dcl in an AutoCAD search path or GATTE2 will not work!) Version 1 Required Files: GATTE2.lsp LayoutSelect.dcl Both in GATTE2 V1.zip. Version 2 Command: G2N ..contains an optional Number Incrementer. It is a .NET program and can be loaded using the command NETLOAD; this can then be put into a lisp for startup if desired. Another way to load a .NET program is shown here. Version 2 Dialog Window Version 2 Required Files: GATTE2.dll (in GATTE2 V2 dll.zip ) Alternatively, compile version 2 using the source files in GATTE2 V2 CS Files.zip. Any comments are welcome, reply to the original thread. GATTE2 V1.zip GATTE2 V2 CS files.zip GATTE2 V2 dll.zip
  49. 1 point
    Not sure about I have understand you right, just try the project ~'J'~ UsingVlax.zip
  50. 1 point
    Uddfl, would you go about altering the "ft" program in this manner? (defun c:ft (/ gcode gcodevalue) ; filter by group code value (works with strings only) (if (setq gcode (getint "\nEnter DXF group code: ")) (progn (cond ((member gcode '(1 2 3 6 7 8 410)) (setq gcodevalue (getstring T "\nEnter code String: "))) ((member gcode '(39 40 41 48 50 51 60 62 66 70 71 72 73 74)) (setq gcodevalue (getreal "\nEnter Code Number: "))) (T (princ "\nDXF Code not Recognised or I couldn't be bothered to look it up when I made this program"))) (and gcodevalue (sssetfirst nil (ssget (list (cons gcode gcodevalue))))))) (princ))
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...