Register  Login   Search
 Latest Posts Minimize

RE: Solid edge reports using an excel macro ?
Solid Edge Programming
09/07/2010 9:49 AM
jason.newell

Creating StructuralFrame - SE20, VB6
Solid Edge Programming
09/07/2010 9:27 AM
Nirantar.Vidyarthee

Solid edge reports using an excel macro ?
Solid Edge Programming
09/06/2010 5:02 PM
jvizi

RE: Remove unused Linestyles
Solid Edge Programming
09/03/2010 7:45 AM
jr199

Remove unused Linestyles
Solid Edge Programming
09/02/2010 1:25 PM
kmwolf

How to read block in a dft file without opening the dft file?
Solid Edge Programming
09/02/2010 9:02 AM
assassin.007

Inquire Element - Measure Diameter by VBA
Solid Edge Programming
09/02/2010 6:40 AM
JM

dissolve Reference to SubASM - how to??
Solid Edge Programming
09/02/2010 2:23 AM
LIHE

RE: Using Insight on a 64 bit Computer
Solid Edge General
08/31/2010 7:47 AM
Atom

Using Insight on a 64 bit Computer
Solid Edge General
08/30/2010 3:06 PM
Atom

RE: File Properties using VB.NET leave file locked
Solid Edge Programming
08/30/2010 9:57 AM
JBZ

RE: File Properties using VB.NET leave file locked
Solid Edge Programming
08/30/2010 3:20 AM
jr199

File Properties using VB.NET leave file locked
Solid Edge Programming
08/27/2010 4:36 PM
JBZ

RE: XLS link to the part
Solid Edge Programming
08/27/2010 4:11 PM
JBZ

RE: Save As for each view -- how 2 wait for SE !
Solid Edge Programming
08/27/2010 3:27 AM
jr199

vb6 se20 - solid edge Part - Hole size
Solid Edge Programming
08/26/2010 9:42 PM
cadraw

vb6 se20 - how to Drawing View Depth
Solid Edge Programming
08/26/2010 9:24 PM
cadraw

RE: Problem while getting the objects using "SelectSet" property.
Solid Edge Programming
08/26/2010 7:35 AM
jr199

RE: About the "Callout"!
Solid Edge Programming
08/26/2010 3:42 AM
fatkids

RE: Save As for each view -- how 2 wait for SE !
Solid Edge Programming
08/25/2010 3:28 AM
ErWo

RE: help to transfer C# codes as following to C++ codes?
Solid Edge Programming
08/24/2010 10:12 PM
assassin.007

RE: FamilyMembers Panel problem (refreshing)
Solid Edge Programming
08/24/2010 3:47 PM
peter6396

Save As for each view -- how 2 wait for SE !
Solid Edge Programming
08/24/2010 4:09 AM
LIHE

RE: FamilyMembers Panel problem (refreshing)
Solid Edge Programming
08/24/2010 1:28 AM
ErWo

help to transfer C# codes as following to C++ codes?
Solid Edge Programming
08/23/2010 10:34 PM
assassin.007

Problem while getting the objects using "SelectSet" property.
Solid Edge Programming
08/22/2010 7:59 AM
pratap

FamilyMembers Panel problem (refreshing)
Solid Edge Programming
08/20/2010 4:12 AM
peter6396

RE: AddLoftedFlange in SheetMetal
Solid Edge Programming
08/19/2010 4:33 AM
jason.newell

RE: PartList Positioning
Solid Edge Programming
08/19/2010 2:10 AM
ErWo

RE: Alternate Assemblies
Solid Edge Programming
08/18/2010 4:54 PM
peter6396


  
 Forums Minimize

Subject: Register for COM interop in VB 2008 express
Prev Next
You are not authorized to post a reply.

Author Messages
danlaniganUser is Offline
New Member
New Member
Posts:4

02/01/2010 5:02 PM  

Hi,

 

I'm trying to create a SE addin using VB 2008 express edition. I am using the SE '.NET programmers guide - Chapter 12 Addins' as a reference. I don't get very far before being stumped. There is no 'Register for COM interop' in the compile tab of the project properties dialogue. I understand from some google searches that I have done that this feature is not a part of VB 2008 express. Can anyone suggest a workaround other than buying a real copy of VB 2008.

Thanks.

R.D. HollandUser is Offline
Solid Edge Developer
Site Member
Site Member
Posts:36

02/03/2010 2:22 PM  

You can run regasm.exe on your DLL. In fact, you might want to create a reg file using regasm.exe like this:

regasm.exe /regfile:myaddin.reg /codebase myaddin.dll

That will generate a .reg file. You can then double-click the file to add the data to the registry (or import it into the registry). However on a 64 bit OS, the windows explorer is 64 bit and the data will be added to the 64 bit registry hive. If edge is 64 bit, no problem. If edge is 32 bit, edge won't "see" the addin.

So I keep a regedt32.exe shortcut on my desktop (from the Windows\SysWOW64 directory) and I drag&drop the .reg file on it to get the entries added to the Wow6432Node registry hive(s).

You can also edit the .reg file and replace HKEY_CLASSES_ROOT with HKEY_CLASSES_ROOT\Wow6432Node. Then double-clicking from explorer should add the entries to the 32 bit registry hive.

You can also create a bat file that compiles and registers that you can run from the VS 2005 command prompt or explorer window. Now thanks to Microsoft, if you have the 2005 command prompt tool (ships with VS 2005 - I don't know about "express edition") the regasm.exe is available (type "where regasm" in the prompt window) in the "Visual Studio" environment. And thanks to Microsoft, if you have VS 2008, it is not! But with 2005, you can do something like this in a .bat file:

 

ECHO OFF
CLS

SETLOCAL
PUSHD %VS80COMNTOOLS%
@call vsvars32.bat
POPD

Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Diagnostics /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 /rootnamespace:SEAddIn /win32Resource:resTempl1.res /doc:obj\Release\SEAddIn.xml /define:"CONFIG=\"Release\",TRACE=-1,_MyType=\"Windows\",PLATFORM=\"AnyCPU\"" /reference:D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll,D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll,D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll,D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll,obj\Release\Interop.SolidEdgeConstants.dll,obj\Release\Interop.SolidEdgeFramework.dll /debug:pdbonly /optimize+ /out:obj\Release\SEAddIn.dll /resource:obj\Release\SEAddIn.Dialog1.resources /resource:obj\Release\SEAddIn.EdgeBarForm.resources /resource:obj\Release\SEAddIn.Resources.resources /target:library *.vb "My Project\AssemblyInfo.vb" "My Project\Application.Designer.vb" "My Project\Resources.Designer.vb" "My Project\Settings.Designer.vb"

regasm.exe /codebase obj\Release\SEAddIn.dll

Vbc.exe /noconfig /win32Resource:resTempl1.res /define:"CONFIG=\"Debug\",DEBUG=-1,TRACE=-1,_MyType=\"Windows\"" /reference:D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll,D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll,D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll,D:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /out:obj\Release\SEAddInRes.dll /target:library resproxy.vb

copy obj\Release\SEAddInRes.dll bin\Release\SEAddInRes.dll

ENDLOCAL

ECHO Compile Complete

 

Now your compile line won't be the same as the above. But no problem if "express" is like VB .NET. Just get a clean build. The output window will contain that giant "Vbc.exe" line above. Replace mine with yours in the bat file and you should be able to build from any prompt or by double clicking the bat file.

I uploaded a sample VB.NET add-in today for another post and the zip file has a number of bat files (one for each build config - x86, x64 and "Any CPU". There is also a readme.txt file that gives lots of nauseating details about how VB .NET does it's best to thwrat your every attempt to get a good addin together.

One other note, if your project doesn't have a GUID attribute, VB .NET likes to assign a new CLSID/GUID to your object each time you build. That means generating the .reg file using regasm /regfile would have to be performed each time you build the add-in. VB 6 used to have a "binary compatible" checkbox under "Component" on the properties page to keep that from occurring. I never found the equivalent in VB .NET.

danlaniganUser is Offline
New Member
New Member
Posts:4

02/04/2010 5:27 PM  

Wow, thanks.

I wasn't expecting such a well thought out and involved response, so thank you.

Given my beginner status wrt SE addins I will have to go through what you have said slowly and absord what I can. I'll also read up on the other thread that you mentioned

Dan

You are not authorized to post a reply.
Forums > Solid Edge > Programming > Register for COM interop in VB 2008 express



ActiveForums 3.7

  

 Users Online Minimize

Membership Membership:
Latest New User Latest: lumpypumpkin
New Today New Today: 2
New Yesterday New Yesterday: 2
User Count Overall: 1972

People Online People Online:
Visitors Visitors: 2
Members Members: 0
Total Total: 2

Online Now Online Now:

  

The Code Project

Spatial Freedom Astroid

Use OpenDNS

Copyright 2010 JasonNewell.NET   Terms Of Use  Privacy Statement