Results 1 to 5 of 5

Thread: Retrieve Object ID

  1. #1
    Member
    Join Date
    2006-02
    Location
    SLC
    Posts
    35

    Default Retrieve Object ID

    What is a way that I can retrieve information about a specific object (specifically a block) within LISP?

  2. #2
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473

    Default Re: Retrieve Object ID

    Hi,

    Have a look at the entget function and DXF codes in the help files for starters. Do you have a specific task in mind? There are a lot of people here that can help.
    Tim Creary
    S&D
    DILLIGAF

  3. #3
    Member
    Join Date
    2006-05
    Posts
    11

    Default Re: Retrieve Object ID

    Quote Originally Posted by jseamons
    What is a way that I can retrieve information about a specific object (specifically a block) within LISP?
    Dear Jseamons,

    Try:

    Code:
    (vl-load-com)
    (setq BlkName "MyBlockName");Change this
    (setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object)))
    (setq BlkCol (vla-get-Blocks ActDoc))
    (setq BlkSty (vla-Item BlkCol BlkName))
    (setq BlkID (vla-get-ObjectID BlkSty))
    Regards, J.AAIJ


    See for Tables http://www.cadtutor.net/forum/viewto...ghlight=hofcad

    [ Moderator Action = ON ] What are [ CODE ] tags... [ Moderator Action = OFF ]
    Last edited by j.aaij; 2006-06-02 at 06:07 AM. Reason: [CODE] tags added, see moderator comment

  4. #4
    Member
    Join Date
    2006-02
    Location
    SLC
    Posts
    35

    Default Re: Retrieve Object ID

    Basically I am trying to get text attributes entered in a block and then use it in another block with a field. That way the second or third or so on is linked to the initial block. I have tried some of the suggestions but I get confused with some of the code. I haven't been able to spend the time I would like to figure it out yet but I thought I would try this great resource.

  5. #5
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,706

    Default Re: Retrieve Object ID

    Quote Originally Posted by jseamons
    Basically I am trying to get text attributes entered in a block. . . .
    You may use nentsel
    (setq Txt (cdr (assoc 1 (entget (car (nentsel))))) )

    : ) Happy Computing !

    kennet

Similar Threads

  1. Trying to retrieve and use X value of a point
    By ReachAndre in forum AutoLISP
    Replies: 2
    Last Post: 2006-11-08, 05:13 AM
  2. Retrieve block
    By cadprog in forum Dot Net API
    Replies: 0
    Last Post: 2006-09-02, 08:22 AM
  3. Layer Retrieve
    By BCrouse in forum AutoLISP
    Replies: 1
    Last Post: 2005-04-20, 10:19 AM
  4. Attribute retrieve
    By partha_ghosh70 in forum AutoLISP
    Replies: 2
    Last Post: 2004-11-18, 06:45 PM
  5. Retrieve Computer ID
    By pcs in forum AutoLISP
    Replies: 14
    Last Post: 2004-06-10, 03:26 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
  •