Visual LISP, AutoLISP and General Customization
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service. To translate this discussion, select the language.

Visual LISP, AutoLISP and General Customization

Reply
Post 1 of 17

Enable LISP in AutoCAD 2014

49807 Views, 16 Replies
04-01-2013 03:19 AM

Hello to all,
today I tried for the first time AutoCAD 2014.
I then tried to install my application that uses ACADINST to add search paths and file *.Fas to be loaded automatically.
After installing my application I open AutoCAD 2014 and I noticed that my application would not start.


I checked, so if ACADINST had done its work: the search paths have been added successfully, and also the *.Fas to be loaded automatically.
Then, later, I realized that as long as the user does not start, at least once, the command "_APPLOAD", these messages do not appear and there is no way to start the application ... if instead the user starts "_APPLOAD" then close and reopen AutoCAD, messages appear asking for the permission to start my file *. fas.

question:
- How can I delete these messages immediately, during the installation? you can delete them automatically without requiring the end user to do it manually?

 

PS. is very bad, tell a customer of a commercial application to perform operations manual in order to use the application. Moreover, very often, users are not experts and risk crowding technical support.

Thanks in advance

Post 2 of 17

Re: Enable LISP in AutoCAD 2014

04-01-2013 04:03 AM in reply to: Lupo76

Lupo76 wrote:

Hello to all,
today I tried for the first time AutoCAD 2014.
I then tried to install my application that uses ACADINST to add search paths and file *.Fas to be loaded automatically.
After installing my application I open AutoCAD 2014 and I noticed that my application would not start.


I checked, so if ACADINST had done its work: the search paths have been added successfully, and also the *.Fas to be loaded automatically.
Then, later, I realized that as long as the user does not start, at least once, the command "_APPLOAD", these messages do not appear and there is no way to start the application ... if instead the user starts "_APPLOAD" then close and reopen AutoCAD, messages appear asking for the permission to start my file *. fas.

question:
- How can I delete these messages immediately, during the installation? you can delete them automatically without requiring the end user to do it manually?

 

PS. is very bad, tell a customer of a commercial application to perform operations manual in order to use the application. Moreover, very often, users are not experts and risk crowding technical support.

Thanks in advance


a shot in the dark, not yet installed the 2014

 

System Variables
APPAUTOLOAD
SECURELOAD
TRUSTEDPATHS...

 

hope that helps
Henrique

Post 3 of 17

Re: Enable LISP in AutoCAD 2014

04-01-2013 04:16 AM in reply to: hmsilva

Thanks for the reply.

I found a way to add, using lisp, the paths of my application in the ramification "Trusted Locations" in the options.
But I have to tell my customers to run at least once (for no apparent reason ... for them ....) the "_APPLOAD."

 

I try to explain better:
1. I install my application thanks to a Setup.exe file, this file will automatically add the paths in "Support File Search Path" and the file "load_nameapp.lsp" in APPLOAD -> Contents


2. so I expect that when I open AutoCAD, the first time, it asks the user for permission to load the file "load_nameapp.lsp", the user answers yes, and then they are automatically add the necessary paths in "Trusted Locations '

 

Unfortunately this does not happen, as long as you do not start at least once, manually, the command "APPLOAD" and, without doing anything close the dialog box.
This is very strange ... because the file "load_nameapp.lsp" does not start automatically? Smiley Sad

Post 4 of 17

Re: Enable LISP in AutoCAD 2014

05-07-2013 04:02 AM in reply to: Lupo76
cannot really help , only i can tell i'm also having problems customizing freshly installed acad 2014
among other issues , acaddoc.lsp won't load properly .
Post 5 of 17

Re: Enable LISP in AutoCAD 2014

05-07-2013 04:20 AM in reply to: mrkaplan
"acaddoc.lsp won't load properly"

can you be more specific...
Highlighted
Post 6 of 17

Re: Enable LISP in AutoCAD 2014

05-07-2013 01:35 PM in reply to: hmsilva

If you're not prepared to incorporate the new (poorly designed) AutoCAD Security protocol into your setup, then there a few steps you might consider:

 

 

:: Making AutoCAD Security work ::

 

Support File Search Path (SFSP) works exactly as it has previously, and is required to 'find' exacutable files being loaded via LOAD, or AUTOLOAD functions, etc. if full-path is not included within your respective 'load' call. When SecureLoad /= 0, you must also include the parent folder(s) for your exacutable files as part of TrustedPaths system variable... These paths are _not_ used to 'find' your exacutable files without full-path specification, or including relative-paths... Also worthy of note, is the "\..." sequence noted here.

 

 

:: Restoring Legacy Functionality ::

 

Set SecureLoad = 0... That's it... No more TrustedPaths, etc..

 

 

:: Bypassing AutoCAD Security Altogether ::

 

Create yourself a simple Autoloader .bundle located in one of the three ..\ApplicationPlugins\ folders (read back-doors) installed on your computer, and any, and all of your code is impllicityly trusted, and will bypass AutoCAD Security even if enabled. That's it. 

 

Any entry level CAD Tech with a conection to Al Gore's Interwebs can download an Autoloader .bundle from anywhere, and drop it into one of the three above mentioned back-doors, and any CAD Manager, or AutoCAD Security measures have just been bypassed with nothing more than a few clicks of the mouse.

 

Further, Autoloader doesn't even bother to preclude Hidden folders, so in reality you can have malicious code create a Hidden .bundle and AutoCAD, or Autoloader isn't smart enough to _not_ load it, because anything placed in one of those three directories is automagically trusted, no matter who put it there.

 

 

 

Happy coding... Cheers



"Potential has a shelf life." - Margaret Atwood


Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security


AutoCAD®, and Civil 3D® Certified Professional ~ Autodesk® Authorized Developer

Post 7 of 17

Re: Enable LISP in AutoCAD 2014

06-28-2013 09:28 AM in reply to: Lupo76

Another method that is working for me is using the hidden acad.lsp file. Create your autoloader LISP file and name it acad.lsp and place this in the support directory of the product. AutoCAD will always load files from this directory.

 

Within this file, add the following command and insert your 'trusted paths' as needed. Separate each via semicolon.

 

This will automatically set the trusted paths. Note Autodesk does recommend that these paths be set to read only as well to decrease vulnerability.

 

(command "TrustedPaths" "C:\\My\\Trusted\\Path;C:\\My\\Trusted\\Path")

 

 

Steve

Windows 7 Enterprise 64-bit SP1
Intel Core i7 CPU X920 @ 1.73 GHz
16.00 GB RAM
Civil 3D 2013 - 2015

Check out my AutoCAD, Civil 3D, and Map Apps on the Autodesk Exchange Store at: Autodesk Exchange Store
Post 8 of 17

Re: Enable LISP in AutoCAD 2014

06-28-2013 09:58 AM in reply to: stevenh0616

stevenh0616 wrote:

Another method that is working for me is using the hidden acad.lsp file. Create your autoloader LISP file and name it acad.lsp and place this in the support directory of the product. AutoCAD will always load files from this directory.

 

Within this file, add the following command and insert your 'trusted paths' as needed. Separate each via semicolon.

 

This will automatically set the trusted paths. Note Autodesk does recommend that these paths be set to read only as well to decrease vulnerability.

 

(command "TrustedPaths" "C:\\My\\Trusted\\Path;C:\\My\\Trusted\\Path")

 

 


Including an Acad.lsp file in your Autoloader .bundle folder is not necessary, and can be quite misleading.

 

The LSP included in your .bundle can have any name of your choosing, given PackageContents.xml, and given that any SupportPath attribute value is appended to the _end_ of Support File Search Path (SFSP), the would-be included Acad.lsp would never be found by FindFile() so as to not trample on those who already use Acad.lsp, etc..

 

Not that it's a formal rule, or requirement, I'm simply encouraging a bit more common sense; I hope you can appreciate that.

 

Cheers



"Potential has a shelf life." - Margaret Atwood


Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security


AutoCAD®, and Civil 3D® Certified Professional ~ Autodesk® Authorized Developer

Post 9 of 17

Re: Enable LISP in AutoCAD 2014

07-10-2013 08:43 AM in reply to: Lupo76

Is it possible to make the lisp a command? Acutally I guess my question is can a lisp be added to the ribbon or a tool bar....Can you add an Icon to it ??? the whole idea behind the lisp is so I dont have to type over and over the same thing.

 

Post 10 of 17

Re: Enable LISP in AutoCAD 2014

07-10-2013 11:10 AM in reply to: STEVG13

STEVG13 wrote:

Is it possible to make the lisp a command? Acutally I guess my question is can a lisp be added to the ribbon or a tool bar....Can you add an Icon to it ??? the whole idea behind the lisp is so I dont have to type over and over the same thing.

 


What you do, is create your LISP routine, and demand load it as needed... From keyboard entry, from menu, toolbar, or ribbon button.

 

So for example... I have a LISP file located in "C:\LISP\FOO.lsp" with a single 'command' named "c:FOO", and this path is both added to my SFSP and TrustedPaths. I also have a menu, toolbar, or ribbon button macro in my Main CUIx:

 

^C^C^P(if (not c:FOO)(load "FOO.lsp")) FOO ^P

 

... Which will check to see if the symbol c:FOO has been defined as a subroutine yet, and if not, it will attempt to LOAD "FOO.lsp" via FINDFILE (which searches SFSP), and then invokes the FOO command.

 

This gives you the capability of LISP, from any aspect of the CUIx that supports macros, and allows for keyboard entry in one step.

 

The icons, etc. are all done via CUI Editor within your CUIx.

 

 

 

Another option, is to simply AUTOLOAD "FOO.lsp" from AcadDoc.lsp, which would allow for a simpler macro:

 

^C^C^PFOO ^P

 

 

Cheers



"Potential has a shelf life." - Margaret Atwood


Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security


AutoCAD®, and Civil 3D® Certified Professional ~ Autodesk® Authorized Developer

Post 11 of 17

Re: Enable LISP in AutoCAD 2014

08-01-2013 02:26 PM in reply to: BlackBox_

As you mention SECURELOAD in this thread, I'm posting this white paper for you guys to checkout http://adndevblog.typepad.com/autocad/2013/07/all-you-need-to-know-about-autocad-secureload-au.html





Fenton Webb

Developer Technical Services

Autodesk Developer Network


Post 12 of 17

Re: Enable LISP in AutoCAD 2014

03-20-2014 02:37 AM in reply to: hmsilva

No need to do anything just follow 2 step:

 

1: type OP on command line and option windows will be appear click on FILE tab under FILE tab click on (Trusted Location ) and then click on Add, copy or type the path of your Lisp commands file location folder apply and close the option window.

 

2: after that simply just go to the manage tab and click on loadApp and click on the Startup Suite Contents and add your required Lisp command file from the same folder which you set the path in (Trusted Location).

 

Close the application and restart it the security massage will not appear because your Lisp folder path is now trusted, I hope it will help you.

Post 13 of 17

Re: Enable LISP in AutoCAD 2014

08-27-2014 11:53 PM in reply to: Lupo76
to enable lisp for all files,from cad options / system / general options & check ( load acad .lsp with every drawing
it will work for all files
Advisor pli
Post 14 of 17

Re: Enable LISP in AutoCAD 2014

09-12-2014 09:30 AM in reply to: STEVG13

 

Here is a video recording that explains the steps involved in creating a partial CUIX and supporting adding a Panel to the “Plugin” tab of the Ribbon in AutoCAD. http://download.autodesk.com/media/adn/DevTV_Creating_a_Partial_CUI/DevTV_Creating_a_Partial_CUI.htm...

 

Area Object Link | Dwg Setup | Feet-Inch Calculator
Exchange App Store


Paul Li
Senior Associate
STIR Architecture (formerly Altoon Partners LLP)
Los Angeles • Amsterdam • Manila
www.stirarchitecture.com
Post 15 of 17

Re: Enable LISP in AutoCAD 2014

12-20-2016 10:43 PM in reply to: BlackBox_

HI BLACK BOX

 

I WAS TRIED AS YOU MENTIONED THAT, BUT ACTUALLY IT SEEMS LIKE NOTHING HAPPEN. 

 

COMMAND LINE PROMPT SHOWING LIKE THIS " LOAD FAILED ERROR" MY LISP FOLDER "MEPEL" 

 

I ATTACHED THE FILE. KINDLY FIND BELOW. COULD YOU HELP ME.

 

THANKS REGARDS 

 

HUSSAIN

Post 16 of 17

Re: Enable LISP in AutoCAD 2014

12-20-2016 11:25 PM in reply to: thajmul2501

Hi @thajmul2501 - 

 

I'm sorry to hear that you're having trouble; what is SECURELOAD sysvar set to?

 

Did you setup your SFSP (Support File Search Path) completely; as in, can the FINDFILE function locate your LISP file, or does it return Nil?

 

As example:

 

(findfile "YourLispFileName.lsp")

 

If I am unable to help you, I'm sure sure that someone smarter than I will be able to; more information is needed.

 

Cheers



"Potential has a shelf life." - Margaret Atwood


Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security


AutoCAD®, and Civil 3D® Certified Professional ~ Autodesk® Authorized Developer

Post 17 of 17

Re: Enable LISP in AutoCAD 2014

12-21-2016 12:00 AM in reply to: BlackBox_
yes i did correctly what you mentioned, but unfortunately i did not get
what i exactly need.

thanks

hussain
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post