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

Enable LISP in AutoCAD 2014

16 REPLIES 16
Reply
Message 1 of 17
Lupo76
56641 Views, 16 Replies

Enable LISP in AutoCAD 2014

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

16 REPLIES 16
Message 2 of 17
hmsilva
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

EESignature

Message 3 of 17
Lupo76
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

Message 4 of 17
mrkaplan
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 .
Message 5 of 17
hmsilva
in reply to: mrkaplan

"acaddoc.lsp won't load properly"

can you be more specific...

EESignature

Message 6 of 17
BlackBox_
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



"How we think determines what we do, and what we do determines what we get."

Message 7 of 17
stevenh0616
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 Hill
Civil Designer / .NET Developer
AutoCAD Certified Professional
AutoCAD Civil 3D Certified Professional
http://redtransitconsultants.com/
Autodesk Exchange Store
Twitter | LinkedIn



Please select the Accept this solution button if my post solves your issue or answers your question.

Message 8 of 17
BlackBox_
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



"How we think determines what we do, and what we do determines what we get."

Message 9 of 17
STEVG13
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.

 

Message 10 of 17
BlackBox_
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



"How we think determines what we do, and what we do determines what we get."

Message 11 of 17
fenton.webb
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
AutoCAD Engineering
Autodesk

Message 12 of 17
ay35181
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.

Message 13 of 17
mero_eng2003
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
Message 14 of 17
paullimapa
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
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 15 of 17
thajmul2501
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

Message 16 of 17
BlackBox_
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



"How we think determines what we do, and what we do determines what we get."

Message 17 of 17
thajmul2501
in reply to: BlackBox_

yes i did correctly what you mentioned, but unfortunately i did not get
what i exactly need.

thanks

hussain

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

Post to forums  

Autodesk Design & Make Report

”Boost