Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
Lupo76
Posts: 74
Registered: ‎07-17-2011
Message 1 of 12 (16,675 Views)

Enable LISP in AutoCAD 2014

16675 Views, 11 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

*Expert Elite*
Posts: 2,391
Registered: ‎12-17-2004
Message 2 of 12 (16,665 Views)

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

Valued Contributor
Lupo76
Posts: 74
Registered: ‎07-17-2011
Message 3 of 12 (16,659 Views)

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? :smileysad:

Valued Mentor
Posts: 471
Registered: ‎01-04-2008
Message 4 of 12 (16,188 Views)

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 .
*Expert Elite*
Posts: 2,391
Registered: ‎12-17-2004
Message 5 of 12 (16,179 Views)

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...
Distinguished Mentor
BlackBox_
Posts: 705
Registered: ‎02-25-2013
Message 6 of 12 (16,144 Views)

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

Contributor
stevenh0616
Posts: 12
Registered: ‎04-12-2011
Message 7 of 12 (14,982 Views)

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 64-bit SP1 HF3

Check out my AutoCAD, Civil 3D, and Map Apps on the Autodesk Exchange Store at: Autodesk Exchange Store or Red Transit Consultants, LLC Website
Distinguished Mentor
BlackBox_
Posts: 705
Registered: ‎02-25-2013
Message 8 of 12 (14,976 Views)

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

New Member
Posts: 1
Registered: ‎07-10-2013
Message 9 of 12 (14,610 Views)

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.

 

Distinguished Mentor
BlackBox_
Posts: 705
Registered: ‎02-25-2013
Message 10 of 12 (14,595 Views)

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

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 interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

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

Ask the Community