Results 1 to 2 of 2

Thread: How to change basepoint of define block

  1. #1
    Member
    Join Date
    2009-05
    Posts
    17
    Login to Give a bone
    0

    Default How to change basepoint of define block

    How to create a macro using LISP for change basepoint of a defined block placed in a drawing.My needs are not changing the block placed possition, attribute possition, angle and applied block edit parameter possition .If possible please give as soon as possible.


    with regars,
    hareeshmb
    Last edited by hareeshmb.219554; 2009-06-11 at 02:44 PM.

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

    Default Re: How to change basepoint of define block

    Welcome to AUGI & congrats on your 1st post.

    There's no way of placing a basepoint parameter inside the block using Lisp / ActiveX / VBA ... probably only possible with ARX / .NET. However the ActiveX block object has an Origin property which can be changed:
    Code:
    (setq blkcol (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object)))) ;Get blocks collection
    (setq blk (vla-Item blkcol "blockname")) ;Get the block's definition object
    (setq pt (vlax-make-safearray vlax-vbDouble '(0 . 2))) ;Create a safearray to hold the 3D point
    (setq pt (vlax-safearray-fill pt '(1000.0 1000.0 0.0))) ;Fill it with the new XYZ values
    (vla-put-Origin blk pt) ;Change the blockdef's origin property to the new point
    BUT!!! This does nothing until you open & close the block in BEDIT. Now you need to entupd each block reference (INSERT) to match the new definition.

    BTW, why not simply BEDIT the block and place a basepoint parameter? Then you can WBLOCK it out and insert browse to other drawings so you can update those definitions as well?

Similar Threads

  1. Replies: 5
    Last Post: 2012-12-10, 07:10 PM
  2. save a dwg file without block define
    By ralphtang in forum AutoCAD Electrical - General
    Replies: 1
    Last Post: 2012-04-27, 07:21 PM
  3. 2011: Dynamic Block - Basepoint
    By przemekmysz in forum ACA General
    Replies: 0
    Last Post: 2012-01-10, 05:04 PM
  4. basepoint not moving with block
    By cwjean76 in forum Dynamic Blocks - Technical
    Replies: 3
    Last Post: 2007-12-21, 07: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
  •