+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Full Member
    Using
    AutoCAD 2010
    Join Date
    Jun 2010
    Location
    Sydney, Australia
    Posts
    65

    Question Macro/Script for Automatically setting 2 Vport Views

    Registered forum members do not see this ad.

    marco is stopping after a user input. i have 2 view ports in one drawing, my macro unlocks all vports, then sets the first view then user input to select the correct viewport, then set the second view then user input to select the correct viewport, the script will then run on to save the drawing, saveas ...... then start over.
    The problem is the command stops after i have selected the viewport saying invalid selection as below. dows anyone know how i can fix this!!
    Command: -view
    Enter an option [?/Delete/Orthographic/Restore/Save/sEttings/Window]: R
    Enter view name to restore: "Sheet_1T"
    Restoring Model space view.
    Select Viewport for view: \
    *Invalid selection*
    Expects a point or Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group
    Select Viewport for view:
    Command:
    here is the macro i'm using:
    Code:
     
    Tilemode
    0
    zoom
    extents
    -vports
    L
    OFF
    _ALL
    -view
    R
    "Sheet_1T"
    \
    _.PSPACE
    -view
    R
    "Sheet_1B"
    \ 
     
    -vports
    l
    on
    _all
    _.pspace
    another option could be to name the viewports somehow and include the viewport names into the script but i'm can't quiet think how i would do this!
    any help would be great thanks
    Last edited by Spinxy; 3rd Apr 2012 at 12:14 am.

  2. #2
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,106

    Default

    Please read the CODE POSTING GUIDELINES and edit your post.

    It will make it easier to read.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  3. #3
    Full Member
    Using
    AutoCAD 2010
    Join Date
    Jun 2010
    Location
    Sydney, Australia
    Posts
    65

    Default

    Registered forum members do not see this ad.

    Cheers post edited

Similar Threads

  1. script to plot all (named)views
    By pmxcad in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 14
    Last Post: 30th Mar 2012, 02:42 am
  2. Macro/script help?
    By hughesey in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 1
    Last Post: 29th Jul 2010, 08:55 am
  3. Set dialog preferences automatically in AutoCAD action macro
    By hosannabizarre in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 8th Jul 2010, 07:01 am
  4. Can autocad automatically create detail views?
    By ammobake in forum AutoCAD General
    Replies: 20
    Last Post: 2nd Jul 2009, 07:39 pm
  5. Automatically generating 3rd angle views of 3d solid
    By JohnBob in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 4th Aug 2005, 07:00 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts