Author Topic: Updating Add-ins from server  (Read 10503 times)

0 Members and 1 Guest are viewing this topic.

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Updating Add-ins from server
« Reply #15 on: April 12, 2017, 03:00:42 PM »
Someone here has 2015 on their computer and will test it when they leave today.

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Updating Add-ins from server
« Reply #16 on: April 13, 2017, 01:15:05 PM »
I tested on two different Windows 7 machines with AutoCAD 2015 and worked fine.
Attached is zip file where Projects folder is in Documents folder of user.

You could also edit the catch block print out the exception message and see what it is.

pBe

  • Bull Frog
  • Posts: 402
Re: Updating Add-ins from server
« Reply #17 on: April 14, 2017, 04:20:49 AM »
... You could also edit the catch block print out the exception message and see what it is.

Now why didn't i think of that before. Using Windows 10 and Autocad 2015

Here is the error message Jeff_H, thank you for your patience.

Object reference not set to an instance of an object

Works on Autocad 2017 on the same machine.
« Last Edit: April 14, 2017, 11:45:07 AM by pBe »

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Updating Add-ins from server
« Reply #18 on: April 14, 2017, 10:55:36 AM »
... You could also edit the catch block print out the exception message and see what it is.

Now why didn't i think of that before. Using Windows 10 and Autocad 2015

Here is the error message Jeff_H, thank you for your patience.

Object reference not set to an instance of an object

Works on Autocad 2017 on the same machine.
I know I used on a machine with windows 10 for 2015 also.

Can you tell which object is null?
That will definitely narrow down and figure out what is going on.

pBe

  • Bull Frog
  • Posts: 402
Re: Updating Add-ins from server
« Reply #19 on: April 14, 2017, 11:44:43 AM »
Thank you Jeff H

Here's what i did

Code - C#: [Select]
  1.                 public Loader()
  2.         {
  3.                 _ed = Application.DocumentManager.MdiActiveDocument.Editor;
  4.                 _netLoaderDirectoryPath = new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
  5.                 System.Windows.Forms.MessageBox.Show("Loader " + _netLoaderDirectoryPath.ToString());
  6.         }

Shows path on 2017
Shows error on 2015 and skipped the first MessageBox

Hope this makes sense.

Thank you for looking into this

EDIT: I think it never got passed _ed

Code - C#: [Select]
  1.             _ed = Application.DocumentManager.MdiActiveDocument.Editor;
  2.             System.Windows.Forms.MessageBox.Show(_ed.ToString());                      
  3.             _netLoaderDirectoryPath = new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
« Last Edit: April 14, 2017, 01:18:02 PM by pBe »

Jeff H

  • Needs a day job
  • Posts: 6144
Re: Updating Add-ins from server
« Reply #20 on: April 14, 2017, 08:58:37 PM »
Try this one on 2015 only and see what the messagebox displays


pBe

  • Bull Frog
  • Posts: 402
Re: Updating Add-ins from server
« Reply #21 on: April 15, 2017, 02:42:34 AM »
Jeff H

Good day to you.

I'm using Visual Studio 2015 / Windows 10 / Autocad 2015.

I copied the files/folders as shown on post #1. Launch Autocad 2015, no message box, no  beep but files were copied. 
Edit the TheSwampAddin1 and update, same result

I now rebuild the whole solution and replace files on the bundle folder, Launch Autocad 2015, It shows the same error as the previous post for 2015 and a beep.

Run Autocad 2017 the first time since i replaced the files from project.zip, the files were copied and cuix loaded.

I then edited the PackageContents.xml contents and replace TheSwampAddin1.dll with of TheSwampAddinLoader.dll. and manually copied the cuix files to .\Autodesk\ApplicationPlugins\TheSwamp.AddinLoader.bundle\Contents\Windows\2016

Code - Auto/Visual Lisp: [Select]
  1. <ComponentEntry LoadOnAutoCADStartup="true" ModuleName="./Contents/Windows/2016/TheSwampAddin1.dll" AppName="TheSwampAddinLoader"/>

The cuix loaded on 2015 and 2017. it appears the Loader class is having an issue with 2015 and/or Windows 10. Not really sure whats happening kind sir.

Thank you
« Last Edit: April 15, 2017, 02:45:59 AM by pBe »

pBe

  • Bull Frog
  • Posts: 402
Re: Updating Add-ins from server
« Reply #22 on: July 15, 2019, 03:25:28 PM »
Hi Jeff,

Is there a version of this for Revit?


Jeff H

  • Needs a day job
  • Posts: 6144
Re: Updating Add-ins from server
« Reply #23 on: July 15, 2019, 03:43:03 PM »
I never built one for Revit.


pBe

  • Bull Frog
  • Posts: 402
Re: Updating Add-ins from server
« Reply #24 on: July 19, 2019, 07:14:58 AM »
No worries Jeff H. I will try to configure it to work with Revit. Thanks for all your help .