Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

My add-in application (VB .net) doesn't appear on addins>external tools

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
rita.aguiar
2190 Views, 8 Replies

My add-in application (VB .net) doesn't appear on addins>external tools

rita.aguiar
Advocate
Advocate

I just started creating a simple add-in application in VB .net for Revit 2019 by following the tutorial:
https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2014/EN... (from Apr 18 2014).

 

I have completed all steps successfully, however, my add-in application doesn't appear on addins>external tools.

 

I took a look at:
https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/simplecontent/content/my-fi...
only to realize it's for C# and cannot help me.

 

Here I found possible reasons to why this may be hapening:

http://help.autodesk.com/view/RVT/2017/ENU/?guid=GUID-8EB25D2A-3CAF-486A-BA8E-C2BEF3DB68F6

"However, in some cases, an add-in application may fail to load without any message. Possible causes include:

  • The add-in application is compiled with a different RevitAPI version
  • The manifest file is not found
  • There is a formatting error in the .addin manifest file"

 

still don't understand what might be the problem. I tried to check all 3:

  • I don't think the first point is the issue, but I don't know how to check which RevitAPI version I am using ? I pretty sure I used the correct RevitAPI.dll and RevitAPIUI.dll from the correct path: C:\Program Files\Autodesk\Revit 2019
  • How do I know if the manifest file has not been found? I saved it on the path that the tutorial says to save it: C:\ProgramData\Autodesk\Revit\Addins\2019
  •  cannot be sure if there is a formatting error in the .addin, but i copy and pasted it carefully to be sure, just changed the path of the .dll and the Class name (see attached printscreen)

 

Any help would be appretiated.

 

 

Revit Version: Full Version of Autodesk Revit 2019
Windows version: 10 Pro

Processor: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

RAM: 32GB

 

0 Likes

My add-in application (VB .net) doesn't appear on addins>external tools

I just started creating a simple add-in application in VB .net for Revit 2019 by following the tutorial:
https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2014/EN... (from Apr 18 2014).

 

I have completed all steps successfully, however, my add-in application doesn't appear on addins>external tools.

 

I took a look at:
https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/simplecontent/content/my-fi...
only to realize it's for C# and cannot help me.

 

Here I found possible reasons to why this may be hapening:

http://help.autodesk.com/view/RVT/2017/ENU/?guid=GUID-8EB25D2A-3CAF-486A-BA8E-C2BEF3DB68F6

"However, in some cases, an add-in application may fail to load without any message. Possible causes include:

  • The add-in application is compiled with a different RevitAPI version
  • The manifest file is not found
  • There is a formatting error in the .addin manifest file"

 

still don't understand what might be the problem. I tried to check all 3:

  • I don't think the first point is the issue, but I don't know how to check which RevitAPI version I am using ? I pretty sure I used the correct RevitAPI.dll and RevitAPIUI.dll from the correct path: C:\Program Files\Autodesk\Revit 2019
  • How do I know if the manifest file has not been found? I saved it on the path that the tutorial says to save it: C:\ProgramData\Autodesk\Revit\Addins\2019
  •  cannot be sure if there is a formatting error in the .addin, but i copy and pasted it carefully to be sure, just changed the path of the .dll and the Class name (see attached printscreen)

 

Any help would be appretiated.

 

 

Revit Version: Full Version of Autodesk Revit 2019
Windows version: 10 Pro

Processor: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

RAM: 32GB

 

8 REPLIES 8
Message 2 of 9
stever66
in reply to: rita.aguiar

stever66
Advisor
Advisor
Accepted solution

There are so many things that could be wrong.  Its hard to tell without seeing your manifest file.

 

But if revit tries to load the addin, you should get a message when revit first starts the first time that addin is loaded that says something like "Do you want to load add-in XX?  Always?  Once?"

 

If you haven't got that, Revit probably isn't reading the manifest file.  Make sure the file extension is HelloWorld.addin, and not HelloWorld.addin.txt, or something like that.

 

Also, did you try starting the program in a de-bugging mode like they show?  Did that work?

 

 

0 Likes

There are so many things that could be wrong.  Its hard to tell without seeing your manifest file.

 

But if revit tries to load the addin, you should get a message when revit first starts the first time that addin is loaded that says something like "Do you want to load add-in XX?  Always?  Once?"

 

If you haven't got that, Revit probably isn't reading the manifest file.  Make sure the file extension is HelloWorld.addin, and not HelloWorld.addin.txt, or something like that.

 

Also, did you try starting the program in a de-bugging mode like they show?  Did that work?

 

 

Message 3 of 9
rita.aguiar
in reply to: stever66

rita.aguiar
Advocate
Advocate

In the attached file (Hello World.png)  you can see the manifest file.

When oppening Revit I do not get any mesage about the loading of the plugin.

I have only tried debug mode, the addin does not appear on the external tools.

The addin is saved correctly and not as an addin.txt

0 Likes

In the attached file (Hello World.png)  you can see the manifest file.

When oppening Revit I do not get any mesage about the loading of the plugin.

I have only tried debug mode, the addin does not appear on the external tools.

The addin is saved correctly and not as an addin.txt

Message 4 of 9
rita.aguiar
in reply to: stever66

rita.aguiar
Advocate
Advocate

It's working!
Thank you for your help.

0 Likes

It's working!
Thank you for your help.

Message 5 of 9
rita.aguiar
in reply to: stever66

rita.aguiar
Advocate
Advocate

However I'm still getting an error: It fails to load the .dll (see attached file).

The Full Class Name is wrong. I don't know what to write them. My Class name is HelloWorld, so I wrote that the FullClassName is HelloWorld. What am I missing?

0 Likes

However I'm still getting an error: It fails to load the .dll (see attached file).

The Full Class Name is wrong. I don't know what to write them. My Class name is HelloWorld, so I wrote that the FullClassName is HelloWorld. What am I missing?

Message 6 of 9
stever66
in reply to: rita.aguiar

stever66
Advisor
Advisor

It also might not be finding the .dll file.   Its often easier to copy the .dll file to the same folder as the addin, and then the <Assembly> line can just be:

 

<Assembly>./HelloWorld.dll</Assembly>

 

or even just

 

<Assembly>HelloWorld.dll</Assembly>

 

Of course, spelling and capitalization is critical here - any typos will cause a failure to load.  Renaming the project after starting it sometimes also seems to be an issue.  I don't know why they do that on a "my first plugin" tutorial.  It seems to work better when I start a VS project with the right name.  Changing the name sometimes seems to have some behind the scenes impact.

 

If there is a namespace in the add-in, you have to add that to the full class name (although I don't see one in the example, but I don't know much about VB.)  So if you had a namespace HelloWorld and a class in that namespace also called HelloWorld, you would use:

<FullClassName>HelloWorld.HelloWorld</FullClassName>

 

That might be worth a try.  I hope something here helps.  If not, you might try starting from scratch, and just name the Project HelloWorld from the start.

 

0 Likes

It also might not be finding the .dll file.   Its often easier to copy the .dll file to the same folder as the addin, and then the <Assembly> line can just be:

 

<Assembly>./HelloWorld.dll</Assembly>

 

or even just

 

<Assembly>HelloWorld.dll</Assembly>

 

Of course, spelling and capitalization is critical here - any typos will cause a failure to load.  Renaming the project after starting it sometimes also seems to be an issue.  I don't know why they do that on a "my first plugin" tutorial.  It seems to work better when I start a VS project with the right name.  Changing the name sometimes seems to have some behind the scenes impact.

 

If there is a namespace in the add-in, you have to add that to the full class name (although I don't see one in the example, but I don't know much about VB.)  So if you had a namespace HelloWorld and a class in that namespace also called HelloWorld, you would use:

<FullClassName>HelloWorld.HelloWorld</FullClassName>

 

That might be worth a try.  I hope something here helps.  If not, you might try starting from scratch, and just name the Project HelloWorld from the start.

 

Message 7 of 9
rita.aguiar
in reply to: stever66

rita.aguiar
Advocate
Advocate

Thank you. I have checked the .dll's properties and it has not been flagged by windows. I have tried with a namespace, without a namespace, with a different class name, with the .dll in the same folder as the addin, and tried doing it all from scratch without renaming the .vb file. Unfortunately it still did not work. It keeps on showing this message, no matter what class name I write:

Failed to initialize the add-in "HelloWorld" because the class "HelloWorld" cannot be found in the add-in assembly.
The FullCassName provides the entry point for Revit to call the add.in application. For Revit to run the add-in, you must ensure this class implements the "Atuodesk. Revit.UI.IExternalCommand" interface.

I think the problem is that it is not finding the class in the assembly.

0 Likes

Thank you. I have checked the .dll's properties and it has not been flagged by windows. I have tried with a namespace, without a namespace, with a different class name, with the .dll in the same folder as the addin, and tried doing it all from scratch without renaming the .vb file. Unfortunately it still did not work. It keeps on showing this message, no matter what class name I write:

Failed to initialize the add-in "HelloWorld" because the class "HelloWorld" cannot be found in the add-in assembly.
The FullCassName provides the entry point for Revit to call the add.in application. For Revit to run the add-in, you must ensure this class implements the "Atuodesk. Revit.UI.IExternalCommand" interface.

I think the problem is that it is not finding the class in the assembly.

Message 8 of 9
stever66
in reply to: rita.aguiar

stever66
Advisor
Advisor
Accepted solution

In visual studio there should be project settings.  Make sure u are using .net 4.7 or 4.7.2 for revit 2019.

 

Also be sure  the revit API and api up files from the revit 2019 folder?  Make sure they are not from an older version.

 

Then find the .dll file and right click it and check the security settings.  Make sure it's not disabled, although I have only seen this on files copied from another computer.

 

you still haven't said if you got the debugging part to work where visual studio starts revit when you start debugging.  You might have to use the " managed compatibility " setting in visual studio to get that to work.

0 Likes

In visual studio there should be project settings.  Make sure u are using .net 4.7 or 4.7.2 for revit 2019.

 

Also be sure  the revit API and api up files from the revit 2019 folder?  Make sure they are not from an older version.

 

Then find the .dll file and right click it and check the security settings.  Make sure it's not disabled, although I have only seen this on files copied from another computer.

 

you still haven't said if you got the debugging part to work where visual studio starts revit when you start debugging.  You might have to use the " managed compatibility " setting in visual studio to get that to work.

Message 9 of 9
rita.aguiar
in reply to: stever66

rita.aguiar
Advocate
Advocate

I just tried with both .net 4.7 and 4.7.2.

i'm using the right API files from Revit 2019.
.dll security settings are not disabled.
 I can start the debugging process successfully andload the .dll. Only when executing the "HelloWorld" addin I still get that message :C

The issue is the Root Namespace in the properties of the project>application tab, which I was not aware of, and has to be included in the FullClassName.

Thank you @stever66!

0 Likes

I just tried with both .net 4.7 and 4.7.2.

i'm using the right API files from Revit 2019.
.dll security settings are not disabled.
 I can start the debugging process successfully andload the .dll. Only when executing the "HelloWorld" addin I still get that message :C

The issue is the Root Namespace in the properties of the project>application tab, which I was not aware of, and has to be included in the FullClassName.

Thank you @stever66!

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

Post to forums  

Autodesk Design & Make Report