Results 1 to 7 of 7

Thread: auto scaling block issue

  1. #1
    I could stop if I wanted to
    Join Date
    2004-07
    Location
    Baton Rouge, Louisiana
    Posts
    254
    Login to Give a bone
    0

    Default auto scaling block issue

    since Autocad 2021 and now in 2022, i have noticed a scaling problem when inserting a block. now i did double check the problem with autocad 2020 and had no problem with block. I wrote a lisp routine for inserting duct turning vanes in duct. basically when the command is used, you pick the inside corner of the turn and the pick the outside corner of the turn, this sets a variable that is run through the lisp file and determines which block to get and inserts the block and scales it to the distance in variable and its done. In autocad 2020 and earlier it works fine, but since 2021 it doubles the scaling of the block.
    the blocks for this function are 1 inch long so they scale ease. now i know i can fix this by rewritting the lisp routine, but should not have to. Has anyone else noticed this problem

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,499
    Login to Give a bone
    0

    Default Re: auto scaling block issue

    Without seeing the lisp I'd have to guess the block was modified somehow. Compare the blocks from an older drawing with one added in 2021. Are they scaled different or are the blocks different sizes when you edit them?
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  3. #3
    I could stop if I wanted to
    Join Date
    2004-07
    Location
    Baton Rouge, Louisiana
    Posts
    254
    Login to Give a bone
    0

    Default Re: auto scaling block issue

    nope its the same blocks and same lisp routine
    here is part of the lisp file

    (defun c:V ()
    (command "osnap" "intersection" "")
    (setq pt1 (getpoint "insertion point: "))
    (setq pt2 (getpoint "rotation point: "))
    (setq len (distance pt1 pt2))
    (cond
    ((< len 16.9706)VA
    (command "-insert" "vane1" pt1 "" "" pt2 "")
    (command "scale" "l" "" pt1 pt2 "")
    )

    i also attached the block that this part of routine calls in
    Attached Files Attached Files

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,499
    Login to Give a bone
    0

    Default Re: auto scaling block issue

    Quote Originally Posted by vtmiii View Post
    nope its the same blocks and same lisp routine
    So you're saying they're the exact same blocks scaled exactly the same are different sizes in drawings drawn in different versions?


    You need to Wrap Code tags around any code you post.

    Clicking the [Go Advanced] button at the bottom puts a toolbar at the top and the # icon in that toolbar places code tags around
    Code:
    selected text
    for you or simply paste your code inside.

    You've only shown part of the lisp missing at least two closing parenthesis and a definition for VA.
    Try changing (command "osnap" "intersection" "") to (setvar 'osmode 32) and changing the other command calls to command-s.
    V is the command alias for the view command. I'd try a little harder to name your lisp command.
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  5. #5
    I could stop if I wanted to
    Join Date
    2004-07
    Location
    Baton Rouge, Louisiana
    Posts
    254
    Login to Give a bone
    0

    Default Re: auto scaling block issue

    ok here is the actual lisp file i wrote here at home before bringing it to work
    and i included the all the vane blocks that the lisp routine file calls for. as stated
    before, it works fine in all cad Versions before 2021. if think its actually a code problem in
    the actual Acad.exe file
    Attached Files Attached Files

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,499
    Login to Give a bone
    0

    Default Re: auto scaling block issue

    Avoid unnecessary command calls replace (command "osnap" "intersection" "") with (setvar 'osmode 32).
    The newer command-s works much cleaner and avoids a lot of issues from using command calls which may be what you've been having.
    The Express Tools installed with AutoCAD have not been updated to command-s and fail all the time now. https://forums.augi.com/showthread.p...lisp-functions
    Again what is VA in line 7 supposed to be doing?
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  7. #7
    I could stop if I wanted to
    Join Date
    2004-07
    Location
    Baton Rouge, Louisiana
    Posts
    254
    Login to Give a bone
    0

    Default Re: auto scaling block issue

    the VA is from some help when i first created the file along time ago (about 6 years ago) with someone here helping me

Similar Threads

  1. 2013: Help: Viewport auto scaling
    By crazyniceguy81384942 in forum AutoCAD General
    Replies: 6
    Last Post: 2013-06-28, 07:24 PM
  2. Strange annotative block scaling issue
    By robgraham31 in forum ACA General
    Replies: 1
    Last Post: 2009-07-16, 06:05 PM
  3. Titleblock - issue date and type of issue placed in issue column
    By jdrexler in forum CAD Management - General
    Replies: 4
    Last Post: 2006-04-10, 05:01 PM
  4. auto-scaling?
    By jkleinowski in forum AutoLISP
    Replies: 3
    Last Post: 2005-06-02, 05:45 AM
  5. Auto Scaling P.Space to Model
    By pnorman in forum AutoLISP
    Replies: 6
    Last Post: 2005-04-26, 04:55 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
  •