Solid Works and .dll component

Hello,

I have the following code compiled as an .exe file and it works just fine but when i try to compile it as an .dll file and run it from the web i get an error.

Here is the code :

Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long Dim Annotation As Object Dim Gtol As Object Dim DatumTag As Object Dim FeatureData As Object Dim Feature As Object Dim Component As Object Dim PartTitle As String

Sub StartPrint() Set swApp = Server.CreateObject("SldWorks.Application") Set Part = swApp.OpenDoc2("D:\Skivetest.SLDPRT", 1, 0, 0, 0, longstatus) Set Part = swApp.ActiveDoc Part.PrintDirect swApp.CloseDoc "Skivetest" swApp.ExitApp End Sub

Here is the Error :

Object required

If someone has any experiance with this i will like to here from you.

I'm using Solidworks 2003 on a win 2000 server with sp4 just to let you know.

Regards, Websam

Reply to
Websam
Loading thread data ...

from the web ??? what are you trying to do ? Did you add "SldWorks 2004 Type Library" in the "References" in VB?

Reply to
Philippe Guglielmetti

Hi Philippe

Im trying to run the .dll from a asp site and from there people can choose a product and then let solid works make the drawing to show to the customer. The code i provided you with is just to test if i can make it as a .dll. The test code provided should just take a drawing and print it out on my printer. And as i wrote it works just fine as a .exe file.

And yes i have added both SldWorks 2003 Type Library and SolidWorks Exxtensibility Type Library > > I have the following code compiled as an .exe file and it works just

Reply to
Websam

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.