See the top rated post in this thread. Click here

Results 1 to 8 of 8

Thread: I have an ename, how do I select the object, using VLISP

  1. #1
    Member
    Join Date
    2003-08
    Posts
    46
    Login to Give a bone
    0

    Question I have an ename, how do I select the object, using VLISP

    I have an ename, how do I select the object, using Vlisp in acad2000i.
    The ename refers to an image. I need to select the image from a
    possible set of images. That is why I derived the ename. Now that I
    have the ename of the image I want, I want to do an IWORLDOUT. The
    issue is that I am prompted to select an object if there is more than
    one image present. Which there may or may not be in a given drawing.
    Any suggestions on a way to handle this?

    Thanks,
    Joe

  2. #2
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    0

    Default Re: I have an ename, how do I select the object, using VLISP

    Hi Joe,
    I'm not sure about IWORLDOUT (and I don't have anything with that command, so this may not help) , but generally you can pass the variable that you put the entity into to a command.
    For example:
    Code:
     
    (defun c:test ()
    (setq ent (car (entsel)));stores the ename in the variable ent
    (command "erase" ent); erases the entity ename
    (princ)
    )
    HTH,
    Tim Creary
    S&D
    DILLIGAF

  3. #3
    Member
    Join Date
    2003-08
    Posts
    46
    Login to Give a bone
    0

    Default Re: I have an ename, how do I select the object, using VLISP

    Thanks for the input, but wouldn't this just present me with another Select Object prompt?

    I tried passing the ename variable "Rstrename" to it but it wanted a point or Last. I tried putting !Rstrename but it still wanted a point or Last.

    Thanks,
    Joe

  4. #4
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,434
    Login to Give a bone
    0

    Default Re: I have an ename, how do I select the object, using VLISP

    Quote Originally Posted by jawf
    Thanks for the input, but wouldn't this just present me with another Select Object prompt?

    I tried passing the ename variable "Rstrename" to it but it wanted a point or Last. I tried putting !Rstrename but it still wanted a point or Last.

    Thanks,
    Joe
    When you use the IWORLDOUT command, what prompts appear on a successful completion of the command? Can you post the contents of your command line of those prompts?
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  5. #5
    Member
    Join Date
    2003-08
    Posts
    46
    Login to Give a bone
    0

    Default Re: I have an ename, how do I select the object, using VLISP

    I figured it out. I just use the following

    (command "Iworldout" (eval rstrename) "" "" "Y")

    This works if there is an existing TFW file. I will have to check to see if there isn't an existing TFW and alter the command accordingly

    Must have been weary last night. Thanks for the help.

    Joe

  6. #6
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    0

    Default Re: I have an ename, how do I select the object, using VLISP

    Hi Joe,

    It was only an example showing how to pass it to a command.

    Could you post what you have so we can have a look at what you are trying to do? It'll be a lot easier that way.
    Also, what does IWORLDOUT do? Is this one of your programs, or a command in a vertical?
    Tim Creary
    S&D
    DILLIGAF

  7. #7
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    1

    Default Re: I have an ename, how do I select the object, using VLISP

    I guess I should refresh before each post. Thanks Opie
    Tim Creary
    S&D
    DILLIGAF

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,434
    Login to Give a bone
    0

    Default Re: I have an ename, how do I select the object, using VLISP

    Quote Originally Posted by timcreary
    I guess I should refresh before each post. Thanks Opie
    No problem.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Similar Threads

  1. ename issue
    By parkerfeldman in forum AutoLISP
    Replies: 1
    Last Post: 2009-08-21, 02:53 PM
  2. Unable to select an OLE Object
    By fishervb in forum AutoCAD General
    Replies: 4
    Last Post: 2006-05-31, 02:36 PM
  3. How can I select last object
    By avinash00002002 in forum VBA/COM Interop
    Replies: 5
    Last Post: 2006-04-07, 05:41 PM
  4. Fix the VLISP/ActiveX object-management bug
    By sinc in forum API Wish List
    Replies: 2
    Last Post: 2004-09-21, 08:10 PM
  5. Replies: 3
    Last Post: 2004-06-14, 06:50 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
  •