Attribute locating.

Discussion in 'AutoCAD' started by BillZ, Jan 27, 2005.

  1. BillZ

    BillZ Guest

    R2005:

    I have been working on a block reference with attributes and have two question:

    1) Is there a way to locate the attributes when adding to the reference that's similar to the "locate below previous attribute" that you use with the command?

    2)When I insert the block, is there a way to get the dialog box to edit attributes to pop up like with the command?

    Here is my code:
    Code:
    ;---;
    (if (vl-catch-all-error-p
    (vl-catch-all-apply '(lambda ()(vla-item *blocks* "TAG")))
    )
    (progn
    (setq BlkObj (vla-Add *blocks* (vlax-3D-Point bip) "TAG")       ;add block to collection.
    )
    (vla-AddAttribute BlkObj Sclf acAttributeModeVerify "" (vlax-3d-point bip) "PART#" "")
    (vla-AddAttribute BlkObj Sclf acAttributeModeVerify "" (vlax-3d-point bip) "MATERIAL" "ALUMINUM")
    (vla-AddAttribute BlkObj Sclf acAttributeModeVerify "" (vlax-3d-point bip) "THICKNESS" "0.100")
    (vla-AddAttribute BlkObj Sclf acAttributeModeVerify "" (vlax-3d-point bip) "ANGLE" "ABS")
    (vla-AddAttribute BlkObj Sclf acAttributeModeVerify "" (vlax-3d-point bip) "MIRROR" "NO")
    )
    )
    (setq Blk1 (vla-InsertBlock *mspace* (vlax-3D-Point bip) "TAG" 1 1 1 0)
    )
    TIA

    Bill
     
    BillZ, Jan 27, 2005
    #1
  2. BillZ

    BillZ Guest

    Okay,
    I see I finally stumped everyone. ;^)

    I did come up with a workaround for the locating.

    (setq plst (cons bip plst))
    (repeat 4
    (setq bip (mapcar '+ (list 0 -1.5 0) bip) plst (cons bip plst))
    )
    I still would like some ideas on the best way to get the vla-insert to display the "Enter Attributes" dialog like it does using the insert command and attdia =1.

    TIA

    Bill
     
    BillZ, Jan 28, 2005
    #2
  3. BillZ

    BillZ Guest

    Okay,

    (vl-cmdf "_.ddatte" (vlax-vla-object->ename Blk1))

    Best I can come up with. ;-)

    Bill
     
    BillZ, Jan 28, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.