Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/05/2021 in all areas

  1. This should give you the way to go with if your field structure is correct. https://www.cadtutor.net/forum/topic/72618-current-drawings-path-and-filename-in-autolisp/?tab=comments#comment-578985
    2 points
  2. Layout title blocks (or xrefs) with attributes would have make this a quick fix and reduced drawing size.
    1 point
  3. You do not really want to use 3DPOLYLINEs for contours. You want to use Polylines with a z value. A contour is all at one level - that is the whole point of them. 3DPolylines can only have continuous linetype and can only be curve fit with splines, which are nasty things to work with. If your contour IS a 3DPolyline, explode it and make it an ordinary Polyline. You will find it much easier to deal with.
    1 point
  4. Hi @BIGAL Your Lisp working well. According @Ish requirement is here (defun c:dd (/ sss obj ang ss vpo) (command "._PSPACE") (prompt "\nSelect source Viewport") (setq sss (ssget "_+.:E:S" (list (cons 0 "Viewport")) )) (setq obj (vlax-ename->vla-object (ssname sss 0))) (if (= (vla-get-objectname obj) "AcDbViewport") (setq ang (vlax-get obj 'TwistAngle)) ) (prompt "\nSelect North symbol Vewport") (setq ss (ssget "_+.:E:S" (list (cons 0 "Viewport")))) (setq vpo (vlax-ename->vla-object (ssname ss 0))) (vlax-put-property vpo 'TwistAngle ang) ) Original Result TwistAngle on Viewport.lsp
    1 point
  5. Here is a more than you asked for but shows the properties of a viewport you could pick north point and get angle, you may need to set angdir 1st else will possibly get wrong angle. You should be able to put twistangle not tested. (command "._PSPACE") (setq sss (ssget "_+.:E:S" (list (cons 0 "Viewport")))) (setq cspace (cdr (assoc 69 (entget (ssname sss 0))))) (setq obj (vlax-ename->vla-object (ssname sss 0))) (if (= (vla-get-objectname obj) "AcDbViewport") (progn (setq cen (vlax-get obj 'Center )) (setq ht (vlax-get obj 'Height)) (setq wid (vlax-get obj 'Width)) (setq sc (vlax-get obj 'customscale )) (setq ang (vlax-get obj 'TwistAngle)) )) I have the other rotate block to match a viewpoint angle.
    1 point
  6. 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
    1 point
×
×
  • Create New...