Jump to content

Search the Community

Showing results for tags 'viewport layout'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 4 results

  1. Hello everybody! I have a lisp file which creates 2 new commands. If I use tne first command, all the viewports in my drawing are locked. If I use the other command, they are all unlocked again. If I use these commands, also the colors of these viewports are changing. If I lock them, they become green. If I unlock the viewports, they become red. The colors are only changing after I use these created commands. If I want to change something and I need to unlock a (locked=green colored) viewport manually at the properties. The color of this viewport doesn't change into red. Is there a way to change this lisp, so the color of a viewport is also changing after I lock or unlock him manually? This is the lisp: (vl-load-com) (defun dxf (n ed) (cdr (assoc n ed))) (defun c:vpl (/ AD COUNT ENT I PL SS TABNAME VP VPNO) (setq ad (vla-get-activedocument (vlax-get-acad-object))) (vlax-for lay (vla-get-layouts ad) (if (/= (setq TabName (strcase (vla-get-name lay))) "MODEL") ;_ end of /= (progn (if (setq ss (ssget "X" (list (cons 0 "viewport") ) ;_ end of list ) ;_ end of ssget ) ;_ end of setq (progn (setq count (sslength ss)) (setq i 0) (if (> count 0) (progn (while (< i count) (setq ent (ssname ss i ) ;_ end of ssname ) ;_ end of setq (setq vpNo (dxf 69 (entget ent ) ;_ end of entget ) ;_ end of dxf ) ;_ end of setq (if (> vpNo 1) (progn (setq vp (vlax-ename->vla-object ent ) ;_ end of vlax-ename->vla-object ) ;_ end of setq (if (= (vla-get-clipped vp ) ;_ end of vla-get-clipped :vlax-false ) ;_ end of = (progn (vla-put-color vp 3 ) ;_ end of vla-put-color (vla-put-layer vp "defpoints" ) ;_ end of vla-put-layer ) ;_ end of progn (progn (setq pl (entget (dxf 340 (entget ent ) ;_ end of entget ) ;_ end of dxf ) ;_ end of entget ) ;_ end of setq ;get clip entity (setq pl (vlax-ename->vla-object (dxf -1 pl ) ;_ end of dxf ) ;_ end of vlax-ename->vla-object ) ;_ end of setq (vla-put-color pl 3 ) ;_ end of vla-put-color (vla-put-layer pl "defpoints" ) ;_ end of vla-put-layer (vla-put-color vp 3 ) ;_ end of vla-put-color (vla-put-layer vp "defpoints" ) ;_ end of vla-put-layer ) ;_ end of progn ) ;_ end of if (vla-put-displaylocked vp :vlax-true ) ;_ end of vla-put-displaylocked (vla-update vp) ) ;_ end of progn ) ;_ end of if (setq i (1+ i)) ) ;_ end of while ) ;_ end of progn ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of vlax-for ) ;_ end of defun (defun c:vpu (/ AD COUNT ENT I PL SS TABNAME VP VPNO) (setq ad (vla-get-activedocument (vlax-get-acad-object))) (vlax-for lay (vla-get-layouts ad) (if (/= (setq TabName (strcase (vla-get-name lay))) "MODEL") ;_ end of /= (progn (if (setq ss (ssget "X" (list (cons 0 "viewport") ) ;_ end of list ) ;_ end of ssget ) ;_ end of setq (progn (setq count (sslength ss)) (setq i 0) (if (> count 0) (progn (while (< i count) (setq ent (ssname ss i ) ;_ end of ssname ) ;_ end of setq (setq vpNo (dxf 69 (entget ent ) ;_ end of entget ) ;_ end of dxf ) ;_ end of setq (if (> vpNo 1) (progn (setq vp (vlax-ename->vla-object ent ) ;_ end of vlax-ename->vla-object ) ;_ end of setq (if (= (vla-get-clipped vp ) ;_ end of vla-get-clipped :vlax-false ) ;_ end of = (progn (vla-put-color vp 1 ) ;_ end of vla-put-color ; 3 green (vla-put-layer vp "defpoints" ) ;_ end of vla-put-layer ) ;_ end of progn (progn (setq pl (entget (dxf 340 (entget ent ) ;_ end of entget ) ;_ end of dxf ) ;_ end of entget ) ;_ end of setq ;get clip entity (setq pl (vlax-ename->vla-object (dxf -1 pl ) ;_ end of dxf ) ;_ end of vlax-ename->vla-object ) ;_ end of setq (vla-put-color pl 1 ) ;_ end of vla-put-color (vla-put-layer pl "defpoints" ) ;_ end of vla-put-layer (vla-put-color vp 1 ) ;_ end of vla-put-color ; 3 green (vla-put-layer vp "defpoints" ) ;_ end of vla-put-layer ) ;_ end of progn ) ;_ end of if (vla-put-displaylocked vp :vlax-false ) ;_ end of vla-put-displaylocked (vla-update vp) ) ;_ end of progn ) ;_ end of if (setq i (1+ i)) ) ;_ end of while ) ;_ end of progn ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of vlax-for ) Is it also possible, after I opened a drawing, every viewport is locked (and green) already? In other words, the command "VPL" is already used before I can change the drawing? Thank you all for your replies! Greetings Sander
  2. I'm a newbie to AutoCad, I'm currently using Autocad 2012, does anyone know how I can scale a text in viewport whose drawing was referenced in the model view. Please any help will be appreciated. fyi the referenced drawing is a survey drawing. Thanks to all in advance
  3. GUY IN THE HAT

    moving viewports

    So I have a viewport, viewing exactly what i want it to in model space but it's not where i want it in paper space. When i move the viewport entity in paper space it's changing my view in model space. How do I lock what the viewport is seeing? I've tried locking, that doesn't seem to do it. I've tried yelling at it and that's not working. I'd try beating it with a stick but I don't know if the computer could handle it:twisted:. Help is appreciated. cheers George
  4. Hello, I have a problem and it is sort of tricky to describe it without verbosity, but here it is. I am new to Autocad and I use 2002 version. Then I would like to draw some technical drawing of a hexahedron, THEN I would like to print it from three points of view top, side, perspective, all with readable dimensions. The problem is how to change what shows up in viewports inserted in the layout. Cannot figure out how to make change what they show. Would be very grateful for some advice AlKnoll
×
×
  • Create New...