Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Contributor
donbutler
Posts: 13
Registered: ‎04-14-2010
Message 1 of 4 (429 Views)

ActiveX Server Error in 2013 and 2014 VLA-ADD

429 Views, 3 Replies
05-09-2013 12:00 PM

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

Contributor
donbutler
Posts: 13
Registered: ‎04-14-2010
Message 2 of 4 (425 Views)

Re: ActiveX Server Error in 2013 and 2014 VLA-ADD

05-09-2013 12:11 PM in reply to: donbutler

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

Active Contributor
AlessiMarc'Antonio
Posts: 49
Registered: ‎12-04-2006
Message 3 of 4 (393 Views)

Re: ActiveX Server Error in 2013 and 2014 VLA-ADD

05-15-2013 01:52 AM in reply to: donbutler

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
Contributor
chicodon
Posts: 22
Registered: ‎04-20-2012
Message 4 of 4 (385 Views)

Re: ActiveX Server Error in 2013 and 2014 VLA-ADD

05-15-2013 05:42 AM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community