Results 1 to 7 of 7

Thread: routine won't scale by r of 2 to 1 ???

  1. #1
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default routine won't scale by r of 2 to 1 ???

    Code:
    ;Created September 2007 BY: Dennis Hopper for vascular PMIs
    ;Will perform a number of steps to aid in getting 1/4" dwgs
    ;to 1/8" dwgs and have the dims reflect changes to dwgs scale
    
    (defun C:vas (/ obj pt1 obj1)
      (setvar "dimtxt" 2.5)
      (setq obj(ssget))
      (setq pt1(getpoint))
        (command "_.scale" obj"" pt1"" r 2.0 1.0)
    
        (alert "\nSelect Objects To Update Dimension Text Height: ")
      (SETQ OBJ1(ssget))
    	 (command "_.DIM" "UP" OBJ1"")
      (alert "\nHit Escape To Exit: ")
      (PRINC)
      )
    It lets me select objects, pick point, and then does not scale, but does let me select dims and will perform the update ideas?

  2. #2
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: routine won't scale by r of 2 to 1 ???

    Either you need to add some "Fuzz" to the selection point, or use a selection set.

  3. #3
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default Re: routine won't scale by r of 2 to 1 ???

    Quote Originally Posted by carl_hd_collins View Post
    Either you need to add some "Fuzz" to the selection point, or use a selection set.
    a selection set for scale factor?

    what about get user input?

  4. #4
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: routine won't scale by r of 2 to 1 ???

    Quote Originally Posted by d_m_hopper View Post
    a selection set for scale factor?

    what about get user input?
    Yeah, you can pause for user input, grab that as a selection set then operate on it however you like.
    Code:
     
    (setq obj (entsel "Pick Object: "))
    (command "scale" obj "" "@0,0" 0.5)

  5. #5
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default Re: routine won't scale by r of 2 to 1 ???

    Quote Originally Posted by carl_hd_collins View Post
    Yeah, you can pause for user input, grab that as a selection set then operate on it however you like.
    Code:
     
    (setq obj (entsel "Pick Object: "))
    (command "scale" obj "" "@0,0" 0.5)
    that worked perfect I had to change the insertion point so that the dwg would return to its home position

    thanks a bunch

  6. #6
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: routine won't scale by r of 2 to 1 ???

    Quote Originally Posted by d_m_hopper View Post
    that worked perfect I had to change the insertion point so that the dwg would return to its home position

    thanks a bunch
    Yeah, the insertion point bit was just a holder, it would use wherever you picked to select the object.

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

    Default Re: routine won't scale by r of 2 to 1 ???

    Quote Originally Posted by d_m_hopper View Post
    It lets me select objects, pick point, and then does not scale, but does let me select dims and will perform the update ideas?
    Try this.
    Code:
    (defun C:vas (/ ss pt1 obj1)
      (setvar "dimtxt" 2.5)
      (setq pt1(getpoint "Select base point for scaling. "))
      (prompt "Select objects to scale. ")
      (setq ss(ssget))
      (command "_.scale" "P" "" pt1"r" 2.0 1.0)
      (alert "\nSelect Objects To Update Dimension Text Height: ")
      (SETQ OBJ1(ssget))
      (command "_.DIM" "UP" OBJ1"")
      (alert "\nHit Escape To Exit: ")
      (PRINC)
    )

Similar Threads

  1. Help! Viewport Scale Change Routine
    By ch00su in forum AutoLISP
    Replies: 4
    Last Post: 2012-08-22, 02:21 AM
  2. Replies: 12
    Last Post: 2011-08-03, 08:32 AM
  3. Replies: 6
    Last Post: 2009-03-26, 07:59 PM
  4. LISP routine to Scale in X,Y,Z, independently
    By tim.grud in forum AutoLISP
    Replies: 1
    Last Post: 2006-06-01, 02:31 PM
  5. Replies: 6
    Last Post: 2004-06-30, 08:23 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
  •