Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: match annotation scale to viewport scale

  1. #1
    Login to Give a bone
    0

    Default match annotation scale to viewport scale

    I need a lisp routine that will match the annotation scale to the viewport scale in 2008. I have multiple viewports on the shame sheet file with different scales for each viewport. I am not sure where to go on this site to find code? I am a new member. Thanks!

  2. #2
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,507
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    Quote Originally Posted by Mary_Ellen_Banning View Post
    I need a lisp routine that will match the annotation scale to the viewport scale in 2008. I have multiple viewports on the shame sheet file with different scales for each viewport. I am not sure where to go on this site to find code? I am a new member. Thanks!
    Hi Mary_Ellen_Banning, welcome to AUGI !
    This sounds more like an "annotative scaling" thing available in 2008+ and not a lisp routine. And because I don't have 2008, I can't help you, but others can.

    Cograts on your first post

  3. #3
    Certifiable AUGI Addict dzatto's Avatar
    Join Date
    2006-12
    Location
    Big "D"
    Posts
    3,711
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    Yep, it already exists. Take a look at my screen shot. Please excuse my crude arrow!

    Basically, if it's toggled on, then, when you change the scale of your viewport an anno scale is automatically created and set for annotative objects.

    You may also be interested in the system variable SELECTIONANNODISPLAY.
    When set to 0, it turns off the other anno scales when you select dims and text, so there's no "ghosting".
    Attached Images Attached Images

  4. #4
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    Thanks Ted,
    I guess I should have mentioned that I am saving these files from 2005 to 2008 with a script file running through many directories. The anno scale is being set to 1'=1' unless I pop into each viewport and edit the annotation scale. I wanted a lisp routine that would find the scale of each viewport and match the annotaion scale to that viewport.

  5. #5
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    OK, I've had the same problem. So I've created this routine - should work in a SCR.

    After loading the file, run one of these commands:
    • MatchVPScale to select the Paper Space View Ports to match with the closest AnnoScale, compared to their Zoom Factor
    • MatchAllVPScale to do the same for all Paper Space View Ports on all tabs in current drawing.
    Attached Files Attached Files

  6. #6
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    285
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    your lisp works great except when i run it in a tool palette command it returns this: "Command: ; error: bad argument type: <Entity name: 7ffffbb9760>"

    Also, I think you can make it return to the original layout as well by using a (setvar "ctab" obj) up front... (i'm not good with code btw, I just have a similar lisp file)

    any help would be appreciated.

  7. #7
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    Quote Originally Posted by randyspear View Post
    your lisp works great except when i run it in a tool palette command it returns this: "Command: ; error: bad argument type: <Entity name: 7ffffbb9760>"

    Also, I think you can make it return to the original layout as well by using a (setvar "ctab" obj) up front... (i'm not good with code btw, I just have a similar lisp file)

    any help would be appreciated.
    Not sure what version you're using, but since 2009 (not sure if it's always been this way?), Viewports support a one-way relationship between Annotation Scale, and Standard Scale.

    More specifically, if you set a Viewport's Annotation Scale, the Standard Scale automagically matches the Annotation Scale value... Just be mindful that this relationship is one-way, and subsequent changes to Standard Scale will not be reflected in Annotation Scale.

    Cheers



    Separately, since Irne originally provided LISP to resolve this thread's issue (back in 2008 ), I'll move it to the AutoLISP forum.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  8. #8
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    285
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    thanks, i'm using 2014. trying to automate the clean up of exported revit dwgs.
    the vpscales update to standard scales but the cannoscale within each stays at 1:1 until I either manually pick the scale again for each vport or run this lisp.

  9. #9
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    Quote Originally Posted by randyspear View Post
    thanks, i'm using 2014. trying to automate the clean up of exported revit dwgs.
    the vpscales update to standard scales but the cannoscale within each stays at 1:1 until I either manually pick the scale again for each vport or run this lisp.
    Just so I am clear....

    You open a Revit exported model drawing in AutoCAD, select a Layout Viewport, and in Properties Palette, change the Annotation Scale to desired scale, correct?
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  10. #10
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    285
    Login to Give a bone
    0

    Default Re: match annotation scale to viewport scale

    Sorry, i've replied to this 3 times and it doesn't seem to post.

    to answer your question, no, i open a revit exported drawing (with layouts), I have a tool palette command that runs the check standards to replace the unwanted styles, then it adds annotative scales to the text and dims and then at the end it loads and runs the matchallvpscales on the viewports. however I get an error on the matchallvpscales when I run it in the macro but if i run it separately, it works.

    The error is this:
    Command: matchallvpscale

    Initializing...._MSPACE
    There are no active Model space viewports.

    Command: AutoCAD variable setting rejected: "CVPORT" 4

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 9
    Last Post: 2015-08-21, 06:33 PM
  2. Set Annotation Scale Equal to Viewport Scale
    By CADdancer in forum AutoLISP
    Replies: 2
    Last Post: 2009-10-09, 04:48 PM
  3. match annotation scale to viewport scale
    By ccowgill in forum AutoLISP
    Replies: 33
    Last Post: 2009-05-04, 10:54 PM
  4. Annotation Scale different than Viewport scale!!
    By smooth shoes in forum AutoCAD General
    Replies: 1
    Last Post: 2008-10-17, 08:44 PM
  5. Replies: 0
    Last Post: 2006-11-28, 10:37 PM

Posting Permissions

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