Add-In doesn't load in Inventor??

Add-In doesn't load in Inventor??

Anonymous
Not applicable
1,523 Views
3 Replies
Message 1 of 4

Add-In doesn't load in Inventor??

Anonymous
Not applicable

Dear All,

 

I am trying to change my VBA code to Add-In, I already install SDK> Developertools.msi and wizards.msi. I create a new file with InventorAddIn template. And I build it successfully.

Then I open Inventor -> Add-Ins and nothing happen................

My system is 64bit. I've already read the following topic, but I don't really understand.......

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Inventor-2011-Add-in-not-loading/m-p/2...

I already double click to the "regasm" file........but nothing changes within Inventor Add-Ins.........

 

Has anybody who use Inventor 2011 sp1 64 bit and VB.Net Express 2008 created an Add-In already?????

Please show me how to set up..............

0 Likes
Accepted solutions (1)
1,524 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

I got the solution.........that is, we must open the Regasm by CMD..........and copy the dll file to the same folder, after that

run

c:\windows\microsoft.net\framework64\v2.5xxxx\regasm.exe /codebase AddInName.dll

Does anyone know how to create a Bat file.........??????

0 Likes
Message 3 of 4

Anonymous
Not applicable
Accepted solution

Hi

This is one way to create a cmd file that will register the add-in. Create the installation file, name it something like InventorAddinInstall.cmd, and put it in the same folder as your add-in.
You will of course have to change the name of the add-in in the file... (4th row from the bottom).
/Stefan Olofsson
@echo off
setlocal
set InstDir=%~dp0
set InstFlag=%1
if /i "%PROCESSOR_ARCHITECTURE%"=="amd64" goto reg64
if /i "%PROCESSOR_ARCHITEW6432%"=="amd64" goto reg64
if /i "%PROCESSOR_ARCHITECTURE%"=="IA64"  goto reg64
if /i "%PROCESSOR_ARCHITEW6432%"=="IA64"  goto reg64
echo Registering 32-bit version of addin for Inventor
set regasm=%windir%\Microsoft.Net\Framework\v2.0.50727\regasm.exe
goto lblRegister
:reg64
echo Registering 64-bit version of addin for Inventor
set regasm=%windir%\Microsoft.Net\Framework64\v2.0.50727\regasm.exe
goto lblRegister
:lblRegister
%regasm% %InstFlag% /codebase "%InstDir%AddInName.dll"
goto lblExit
:lblExit
exit /b 0

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

thank you, It work well.

 

Does anyone know how to add RibbonTab for all environment

Recently, I can only add one

If I add more, Add-In doesn't work.

 

First, I use For....Next but it didn't work. Then I use directly and it didn't work too.

At last, I change to the simplest way, and it only works for one environment.

 

Dim oRibbon(3) As Inventor.Ribbon

'oRibbon(0) = m_inventorApplication.UserInterfaceManager.Ribbons.Item("Part")

oRibbon(1) = m_inventorApplication.UserInterfaceManager.Ribbons.Item("Assembly")

'oRibbon(2) = m_inventorApplication.UserInterfaceManager.Ribbons.Item("Drawing")

'oRibbon(3) = m_inventorApplication.UserInterfaceManager.Ribbons.Item("Presentation")

 

'create the newTab

 

Dim NewTab(3) As Inventor.RibbonTab

'NewTab(0) = oRibbon(0).RibbonTabs.Item("ABC")

NewTab(1) = oRibbon.RibbonTabs.Add("NewTab", "NewTabForAssembly", m_ClientID, "id_GetStarted", False)

'NewTab(2) = oRibbon(1).RibbonTabs.Add("New", "NewTabForDrawing", m_ClientID, "id_GetStarted", False)

 'NewTab(3) = oRibbon(1).RibbonTabs.Add("New", "NewTabForPresentation", m_ClientID, "id_GetStarted", False)

 

'create the new panel on the New Tab

  

Dim NEWPanel(3) As Inventor.RibbonPanel

'NEWPanel(0) = NewTab(0).RibbonPanels.Add("NEW IT", "NEWITPanel", m_ClientID)

NEWPanel(1) = NewTab.RibbonPanels.Add("NEW IT", "NEWITPanel", m_ClientID)

'NEWPanel(2) = NewTab(2).RibbonPanels.Add("NEW IT", "NEWITPanel", m_ClientID)

 

'NEWPanel(3) = NewTab(3).RibbonPanels.Add("NEW IT", "NEWITPanel", m_ClientID)

 

'NEWPanel(0).CommandControls.AddButton(m_Button0Def, True, True)

NEWPanel(1).CommandControls.AddButton(m_Button0Def, True, True)

'NEWPanel(2).CommandControls.AddButton(m_Button0Def, True, True)

 'NEWPanel(3).CommandControls.AddButton(m_Button0Def, True, True)

 

 

 

 

 

 

0 Likes