Author Topic: How create installer for vba project for AutoCad  (Read 418 times)

0 Members and 1 Guest are viewing this topic.

stuff

  • Mosquito
  • Posts: 3
How create installer for vba project for AutoCad
« on: July 15, 2020, 06:38:26 AM »

Hello all

Unfortunately, I did not find information on the network about creating an installer for the VBA project, for AutoCad.
It is unclear which development environment to use to create the installer (InstallShield, Wise Installation System or others).



The project has a dvb extension. It contains the procedure for creating a toolbar with buttons.


How to add, with the help of the installer, to the AutoCad startup macro that creates a menu?
Thanks in advance for the answer.

stuff

  • Mosquito
  • Posts: 3
Re: How create installer for vba project for AutoCad
« Reply #1 on: July 15, 2020, 06:21:03 PM »
The contents of the Acad.lsp file:

Code: [Select]
(defun S :: STARTUP ()
(command "_VBALOAD" "MyProject.dvb")
(command "_VBARUN" "MyProject.dvb!ThisDrawing.CreateToolbar")
)


1. The VBA plugin installer in the main AutoCad directory should find the Acad.lsp file
2. If it is not, create it. And add the above code to download.
3. If there is, open it. Check for added lines of plugin download code.

The path to the dvb file must be specified "C: \ Users \ name_user \ AppData \ Roaming \ Autodesk \ ApplicationPlugins \"

stuff

  • Mosquito
  • Posts: 3
Re: How create installer for vba project for AutoCad
« Reply #2 on: July 15, 2020, 06:38:33 PM »
https://adndevblog.typepad.com/autocad/2015/05/autocad-2016-trusted-paths-and-autoloader.html

Quote
In AutoCAD 2014, we introduced Trusted Locations (TRUSTEDPATHS).   “Trusted Paths” are in concept a “white list” of locations that the CAD manager can audit and maintain for add-ins and customizations loaded into AutoCAD.  AutoCAD allows signed files to be loaded from outside of this “whitelist” without SECURELOAD warnings, with the exception that AutoCAD 2016 will check if the publisher of the signed app is in the users trusted publisher certificate store.  The “best practice” is to ensure the “trusted locations” are only writable with Administrator permissions.

Applications utilizing the "autoloader" functionality within AutoCAD have the options to install to the following locations:

%APPDATA%\Autodesk\ApplicationPlugins
%ALLUSERSPROFILE%\Autodesk\ApplicationPlugins
%ProgramFiles%\Autodesk\ApplicationPlugins
%ProgramFiles(x86)%\Autodesk\ApplicationPlugins (In 64-bit OS)

In AutoCAD 2014 & 2015 - %ALLUSERSPROFILE%\Autodesk\ApplicationPlugins and %Appdata%\Autodesk\ApplicationPlugins – are by default trusted paths.

With AutoCAD 2016, only the Program files folder (C:\Program Files\Autodesk\ApplicationPlugins and C:\Program Files (x86)\Autodesk\ApplicationPlugins ) is trusted by default.
This means, when you try to load an unsigned add-in from any location outside of the "trusted locations" you will get a warning message like the one shown below. Note that in AutoCAD 2016 the user can choose to “always trust this app” – if they do, the warning will not be triggered again.

BIGAL

  • Swamp Rat
  • Posts: 538
  • 30 + years of using Autocad
Re: How create installer for vba project for AutoCad
« Reply #3 on: July 16, 2020, 11:24:45 PM »
Have you looked at using Bundle it self loads runs programs on start up etc loads menus.

It lives in Program files\Autodesk\Application plugins uses a xml to tell it what to load etc.
A man who never made a mistake never made anything

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9509
Re: How create installer for vba project for AutoCad
« Reply #4 on: July 17, 2020, 10:00:44 AM »
I used NSIS for many years. Here was a few of my templates I used. I largely used the "silent" installer for company internal stuff (within the trust circle) but a more interactive templates for anything I posted on the internet.

https://www.theswamp.org/index.php?topic=31968.msg377798#msg377798
TheSwamp.org (serving the CAD community since 2003)

Donate to TheSwamp.org