0

I would like to know how I can load my own custom autocad files to the autocad working supported files without options inside Autocad software, but programmatically. I have these following files that I want to load to supported files of autocad programatically , .cuix file .vlx file .mnl file .mnr file .fas file.

  I tried with inno setup.

Honestly, I don't know how to do. Please guide me or teach me how to do.

peteroo
  • 23
  • 9

2 Answers2

0

As per my understanding, you can achieve this stuff by Autoloading those File, while the AutoCAD is started, there is plenty amount of solution available on internet you may check this link1 Link2

Or you can refer below step(Before following this step read above link)

1.Write a function to load the required file as you mention in Question

(defun Load_File()

;To load CUIX file "<..MyPath.../MYMENU.CUIX>" replace this with you CUIX file path
(command "_MENULOAD" "<..MyPath.../MYMENU.CUIX>" "")

;To load VLX file  "<..MyPath.../MY.VLX>" replace this with you VLX file e path
(command "_appload" "<..MyPath.../MY.VLX>")

;Loading a MNU file overwites the corresponding .MNR, .MNS and .MNC files. Keep in mind that if you make any custom toolbars ;and/or buttons using the graphical on-screen method - they will be wiped when you load the MNU

;(I am not sure about MNL/MNR file loading you may try this )
;To load MNLfile  "<..MyPath.../MY.MNL>" replace this with you MNL file e path
(command "_appload" "<..MyPath.../MY.MNL>")

;To load Fas file
(load "<your .Fas file path/my.fas>"

)

(load_File)

2.save this file with name as Load_file.Lsp on trusted path (ie "c:/trusted path/...../Load_File.lsp") (if lisp file is save in trusted path of AutoCAD so AutoCAD not show pop-up while lisp file is load )

3.make new lisp file so it can Autoload as AutoCAD is started with name "acad.lsp" put below code inside file (this code say that load our first "Load_File.lsp" file)

(load "c:/trusted path/...../Load_File.lsp")

this lisp file must be save in install directory of autocad (Ex. "C:\Program Files\Autodesk\AutoCAD 2018") this step is for automatically load "acad.lsp"

As soon as acad.lsp is loaded all your files are load in Autocad.

Dinesh Vilas Pawar
  • 493
  • 2
  • 5
  • 18
  • Can I add these above lsp files to inno setup to make installer package that will programmatically install by double clicking setup.exe? no need to use AcadInst.exe or somethings like this? I would like to know it because I am making a setup file that will install my custom datas programmatically for other users,too. – peteroo Mar 30 '18 at 07:21
  • hey peteroo sorry but, I don't know much about setup.exe or Acadlnst.exe. – Dinesh Vilas Pawar Mar 30 '18 at 12:19
  • now I can load my partial cuix files programmatically .It works when I put my created acad.lsp to autocad file. – peteroo Mar 30 '18 at 18:53
  • @if those file show any dialog box while loading, add this folder path to AutoCAD Trusted file path so it does not show any pop-up. – Dinesh Vilas Pawar Apr 02 '18 at 04:05
0

InnoSetup is a very good choice for You. I use it for few years and it let me do anything I need.

If You have InnoSetup installed, just click File->New and InnoSetup Script Wizard will guide you through the process of creation script. One of the steps is Application Files, where just select Your files mnu, cuix, fas whatever You like

After that compile ( just one click ) and You have Your setup.exe

Using Innosetup You may install files, but also manipulate OS registry - which may be helpful for Your application, but also set Acad supported files paths. here

You can find more details about how to load Your application to Acad after is installed.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
CAD Developer
  • 1,532
  • 2
  • 21
  • 27
  • when I setup acad.lsp and load_file.lsp and I click on my autocad, it shows like that "filename cannot be blank".the system read acad.lsp, but at menuload and appload it shows just above sentenses .please tell me how to – peteroo Mar 30 '18 at 11:14
  • I don't know "how to -" ;) What and how do You "setup". Any sample ? – CAD Developer Apr 03 '18 at 06:02