See the top rated post in this thread. Click here

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Verify Image exists. Crashes if no image exists.

  1. #11
    Member
    Join Date
    2001-08
    Posts
    24
    Login to Give a bone
    0

    Default Re: Verify Image exists. Crashes if no image exists.

    I gotcha. Makes sense to put all the calls under one command rather than a command for each.

    J. Logan

  2. #12
    Member
    Join Date
    2001-08
    Posts
    24
    Login to Give a bone
    0

    Default Re: Verify Image exists. Crashes if no image exists.

    Getting back to this. I found that the setq rev4 hangs after the Ref1 setq statement if there isn't any "Text2" entities with Oblique 30 and angle 20 in the drawing. it will show the selection set and then you have to hit enter for it to move on. if it exists everything runs fine.

    I posted this earlier in the thread

    Command: ERBDR-STD
    ERBDR
    Working, please wait... <Selection set: 8>
    Unknown command "VLIDE". Press F1 for help.
    -- Unknown command "75,21.4375". Press F1 for help.
    -- Unknown command "75,21.4375". Press F1 for help.
    -- Unknown command "E". Press F1 for help.

    the numbers and the "E" are the copy command at the end of the this routine. It seems if I comment out the setq Rev4 section and remove Rev4 from the copy command all is fine.
    I'm guessing I need some kind of "IF" statement for that setq rev4 section.

    (defun c:foo (/ rev1 rev4 ref1)

    (setq rev1 (ssget "_c"
    '(33.375 21.4375)
    '(31.875 5.3125)
    '((8 . "Text2,Line4"))
    )
    )
    ;;the following setq was changed to find Oblique and angle text on TEXT2 layer
    (setq rev4 (ssget "x"
    (list '(8 . "TEXT2")
    (cons 50 (/ pi 6))
    (cons 51 (/ pi 9))
    )
    )
    )

    (setq ref1 (ssget "_c"
    '(28.9375 4.9375)
    '(33.5625 3.3125)
    '((8 . "Text2"))
    )
    )

    (command "._copy" rev1 rev4 ref1 "" "31.75,21.4375" "38.75,21.4375" "E")
    )

    I never could "step through" for debugging.

    J. Logan

Page 2 of 2 FirstFirst 12

Similar Threads

  1. 2015: FAMILY ALREADY EXISTS
    By gordolake in forum Revit Architecture - General
    Replies: 2
    Last Post: 2014-08-26, 11:29 PM
  2. test if level exists
    By sfaust in forum Revit - API
    Replies: 44
    Last Post: 2012-01-11, 04:38 PM
  3. napkin sketch still exists???
    By ccook.135811 in forum ACA General
    Replies: 1
    Last Post: 2007-10-16, 03:38 PM
  4. Detach Image IF it exists
    By jpaulsen in forum AutoLISP
    Replies: 9
    Last Post: 2007-03-02, 11:01 PM
  5. Need help verifying file exists
    By stephen.coff in forum AutoLISP
    Replies: 3
    Last Post: 2006-09-18, 01:48 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
  •