Results 1 to 2 of 2

Thread: ActiveX error

  1. #1
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default ActiveX error

    error: ActiveX Server returned an error: Element
    not found....

    Not sure what is going on, this routine ran before lunch.

    Code:
    (vl-load-com)
    
    
    
     (defun c:mark (/ *error* acsp adoc axss nblk_obj prop_list ss)
       (lisplog)
    
       (command "_.insert" "c:/usr/local/blckmark" "0,0" blscale blscale "0")
     
     (defun *error* (msg) 
       (if 
         (vl-position msg '("Function cancelled" "quit / exit abort"))
         (princ)
         (princ msg))
     
       (vla-endundomark
         (vla-get-activedocument
    (vlax-get-acad-object)))
       (princ)
       )  
     (setq adoc (vla-get-activedocument (vlax-get-acad-object)))
     (setq acsp (vla-get-modelspace adoc))
     
     
     (vla-endundomark adoc)
     (vla-startundomark adoc)
    ;;;(vla-zoomall (vla-get-application adoc))
     
    (if (setq ss (ssget "_X" (list (cons 0 "INSERT")(cons 2 "ge_blk*"))));;select block with prefix "ge_block..."
    (progn
    (setq newname "blckmark")
    (setq axss (vla-get-activeselectionset adoc))
    (vlax-for a axss
      (setq prop_list
             (list
        (vla-get-insertionpoint a)
               (vla-get-xscalefactor a)
        (vla-get-yscalefactor a)
        (vla-get-zscalefactor a)
        (vla-get-rotation a)
        (vla-get-layer a)))
    (setq nblk_obj
        (vla-insertblock acsp (nth 0 prop_list) newname 
        (nth 1 prop_list)
        (nth 2 prop_list)
        (nth 3 prop_list)
        (nth 4 prop_list)))
      (vla-erase a)
      (vlax-release-object a))
      (vla-put-layer nblk_obj (nth 5 prop_list))
      (vla-clear axss)
      (vla-delete axss)
      (vlax-release-object axss)
      (*error* nil)
      )
      )
      (princ)
      )
    (prompt "\n\t\t\t >> Type MARK to execute >> \n")
    (princ)
    the error happens when I get to
    Code:
    (vla-get-insertionpoint a)

  2. #2
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default Re: ActiveX error

    I messed around and then did a re-install, everything is good now.

Similar Threads

  1. Error loading Navis ActiveX Plugin on IE
    By potapczuk542577 in forum NavisWorks - General
    Replies: 0
    Last Post: 2012-06-19, 09:02 PM
  2. Replies: 1
    Last Post: 2012-04-10, 01:57 PM
  3. Run-time error '429' (ActiveX component can't create object)
    By Pwned555402908 in forum VBA/COM Interop
    Replies: 1
    Last Post: 2011-12-08, 10:05 PM
  4. ActiveX Error Help....?
    By CADdancer in forum AutoLISP
    Replies: 3
    Last Post: 2010-04-05, 04:17 PM
  5. Replies: 4
    Last Post: 2004-07-24, 04:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •