Results 1 to 3 of 3

Thread: orginal units of a inserted block?

  1. #1
    I could stop if I wanted to
    Join Date
    2006-04
    Posts
    466
    Login to Give a bone
    0

    Default orginal units of a inserted block?

    Is there a way of detecting the orginal units of a inserted block?

  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: orginal units of a inserted block?

    Quote Originally Posted by aaronic_abacus View Post
    Is there a way of detecting the orginal units of a inserted block?
    Well I don't know, you mean "insunits"?

    without going to the source file, like the dwg file containing the raw block, you could check "insunits" "insunitsdeftarget" and "insunitsdefsource"

  3. #3
    Member
    Join Date
    2007-08
    Posts
    18
    Login to Give a bone
    0

    Default Re: orginal units of a inserted block?

    Code:
    (setq dDbx (vla-getinterfaceobject (vlax-get-acad-object) (strcat "ObjectDBX.AxDbDocument." (substr (getvar 'acadver) 1 2)))
          cFile (getvar "c:\\where is your block. dwg"
          )
      (vla-open dDbx cFile)
      (vlax-for block (vla-get-ModelSpace dDbx)
        (progn
          (if (vlax-property-available-p block 'ObjectName)
    	(if (equal (vla-get-ObjectName block) "AcDbBlockReference")
    	  (print (vla-get-Units block)); or (vla-get-Unit block); etc
    	  )
    	)
          )
        )
    (vlax-release-object dDbx)
    I did not test here. But with something in this line you will be able to get the unit from a block before inserting into your drawing. I did not quite understand your doubt!
    Sorry about my English. I'm in Brazil!
    Last edited by BlackBox; 2017-11-19 at 05:00 AM. Reason: Please use [CODE] Tags

Similar Threads

  1. Inserted Block Name
    By david.brissenden in forum Dot Net API
    Replies: 1
    Last Post: 2012-09-10, 01:50 PM
  2. Scale changes when block is inserted
    By DQUICK in forum AutoCAD General
    Replies: 6
    Last Post: 2011-09-13, 05:29 PM
  3. Can't see inserted block... but it's there...
    By garden_chicken in forum AutoCAD General
    Replies: 4
    Last Post: 2006-03-22, 05:53 PM
  4. Existing Block does not update when new Block is inserted
    By Rachel Ritchie in forum AutoCAD General
    Replies: 4
    Last Post: 2005-12-05, 03:04 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
  •