Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ActiveX Server Error in 2013 and 2014 VLA-ADD

3 REPLIES 3
Reply
Message 1 of 4
donbutler
1021 Views, 3 Replies

ActiveX Server Error in 2013 and 2014 VLA-ADD

The following snippet works in 2012 but fails in 2013 and 2014

 

(if layer
        (progn
             (setq lays (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))
                (if (vl-catch-all-error-p
                      (setq objlay (vl-catch-all-apply 'vla-item (list lays layer)))
                    )
                  (setq objlay (vla-add lays layer))
                )
        )
        (setq objlay (vla-get-activelayer (vla-get-activedocument (vlax-get-acad-object))))
   )

 

This line ...

(setq objlay (vla-add lays layer))

 

Returns:

error: ActiveX Server returned an error: Library not registered

 

Anyone have an idea what's wrong?

 

Thanks

3 REPLIES 3
Message 2 of 4
donbutler
in reply to: donbutler

It looks like the error is coming up in other locations too. I'll keep digging.

Message 3 of 4

Works for me in 2013 sp1:

 

Comando: (setq lays (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))
#<VLA-OBJECT IAcadLayers 0000000028533888>

Comando: (setq objlay (vla-add lays "NEWLAYER"))
#<VLA-OBJECT IAcadLayer 0000000028534de8>

Marc'Antonio Alessi

http://alessi.xoom.it//alessi/Programmi.htm
(vl-string-translate "1234567890" "ie@mst.lan" "499825513610716")
2D Parametric for 2000-2013
Message 4 of 4
chicodon
in reply to: donbutler

Thanks. I had uninstalled AutoDesk 360 and something happened. I reinstalled AutoCad 2014 and now everything is working. Thanks for your input.

Don Butler

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost