.NET

Reply
*Darcy
Message 1 of 5 (90 Views)

VLA-object with no properties and methods

90 Views, 4 Replies
07-24-2005 01:58 PM
I have compiled a class library that is exposed to com and I can
(setq aa (vla-getinterfaceobject acadobj "ClassLibrary4.NET_Temp"))
#
_$ (vlax-dump-object aa t)
it returns:
; _NET_Temperature: nil
; No properties
; No methods
T

How do I setup the properties and methods to be able to use them from lisp?
I am still trying to implement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Any help would be greatly appreciated.
Mathew
*Tony Tanzillo
Message 2 of 5 (90 Views)

Re: VLA-object with no properties and methods

07-24-2005 10:11 PM in reply to: *Darcy
Did you check 'Register for COM Interop' in your
project settings? If not, post your code if it is
not ummmm proprietary.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Darcy" wrote in message news:4909625@discussion.autodesk.com...
I have compiled a class library that is exposed to com and I can
(setq aa (vla-getinterfaceobject acadobj "ClassLibrary4.NET_Temp"))
#
_$ (vlax-dump-object aa t)
it returns:
; _NET_Temperature: nil
; No properties
; No methods
T

How do I setup the properties and methods to be able to use them from lisp?
I am still trying to implement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Any help would be greatly appreciated.
Mathew
*Matthew
Message 3 of 5 (90 Views)

Re: VLA-object with no properties and methods

07-25-2005 07:35 AM in reply to: *Darcy
I have these attributes:
< assemblykeyfileattribute="">
< assemblytitle="">
< clscompliant="">
< comvisible="">

and a Batch file:
"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\sn.exe" -k
PhysServer2.snk
"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\tlbexp.exe"
PhysServer2.dll /out:smileytongue:hysServer2.tlb
"C:\WINdows\Microsoft.NET\Framework\v1.1.4322\regasm.exe"
/tlb:smileytongue:hysServer2.tlb PhysSERVER2.dll
"C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin\gacutil.exe" /i PhysServer2c.dll

Here is the class. I have checked the 'Register for COM Interop' checkbox.
Public Interface iTemperature
Property Celsius() As Double
Property Fahrenheit() As Double
Function GetCelsius() As Double
Function GetFahrenheit() As Double
End Interface

Public Class NET_Temperature
Implements iTemperature

Private mdblCelsius As Double
Private mdblFahrenheit As Double

Public Property Celsius() As Double _
Implements iTemperature.Celsius
Get
Celsius = mdblCelsius
End Get
Set(ByVal Value As Double)
mdblCelsius = Value
mdblFahrenheit = ((Value * 9) / 5) + 32
End Set
End Property

Public Property Fahrenheit() As Double _
Implements iTemperature.Fahrenheit
Get
Fahrenheit = mdblFahrenheit
End Get
Set(ByVal Value As Double)
mdblFahrenheit = Value
mdblCelsius = ((Value - 32) * 5) / 9
End Set
End Property

Public Function GetCelsius() As Double _
Implements iTemperature.GetCelsius
GetCelsius = mdblCelsius
End Function

Public Function GetFahrenheit() As Double _
Implements iTemperature.GetFahrenheit
GetFahrenheit = mdblFahrenheit
End Function
End Class

Thanks again.
Matthew


"Tony Tanzillo" wrote in message
news:4909714@discussion.autodesk.com...
Did you check 'Register for COM Interop' in your
project settings? If not, post your code if it is
not ummmm proprietary.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Darcy" wrote in message
news:4909625@discussion.autodesk.com...
I have compiled a class library that is exposed to com and I can
(setq aa (vla-getinterfaceobject acadobj "ClassLibrary4.NET_Temp"))
#
_$ (vlax-dump-object aa t)
it returns:
; _NET_Temperature: nil
; No properties
; No methods
T

How do I setup the properties and methods to be able to use them from lisp?
I am still trying to implement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Any help would be greatly appreciated.
Mathew
*Tony Tanzillo
Message 4 of 5 (90 Views)

Re: VLA-object with no properties and methods

07-25-2005 03:59 PM in reply to: *Darcy
Search MSDN for the ClassInterfaceType and ProgID attributes.

You're missing those, which is required for a class
that is exposed via COM.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Matthew" wrote in message news:4910016@discussion.autodesk.com...
I have these attributes:
< assemblykeyfileattribute="">
< assemblytitle="">
< clscompliant="">
< comvisible="">

and a Batch file:
"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\sn.exe" -k
PhysServer2.snk
"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\tlbexp.exe"
PhysServer2.dll /out:smileytongue:hysServer2.tlb
"C:\WINdows\Microsoft.NET\Framework\v1.1.4322\regasm.exe"
/tlb:smileytongue:hysServer2.tlb PhysSERVER2.dll
"C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin\gacutil.exe" /i PhysServer2c.dll

Here is the class. I have checked the 'Register for COM Interop' checkbox.
Public Interface iTemperature
Property Celsius() As Double
Property Fahrenheit() As Double
Function GetCelsius() As Double
Function GetFahrenheit() As Double
End Interface

Public Class NET_Temperature
Implements iTemperature

Private mdblCelsius As Double
Private mdblFahrenheit As Double

Public Property Celsius() As Double _
Implements iTemperature.Celsius
Get
Celsius = mdblCelsius
End Get
Set(ByVal Value As Double)
mdblCelsius = Value
mdblFahrenheit = ((Value * 9) / 5) + 32
End Set
End Property

Public Property Fahrenheit() As Double _
Implements iTemperature.Fahrenheit
Get
Fahrenheit = mdblFahrenheit
End Get
Set(ByVal Value As Double)
mdblFahrenheit = Value
mdblCelsius = ((Value - 32) * 5) / 9
End Set
End Property

Public Function GetCelsius() As Double _
Implements iTemperature.GetCelsius
GetCelsius = mdblCelsius
End Function

Public Function GetFahrenheit() As Double _
Implements iTemperature.GetFahrenheit
GetFahrenheit = mdblFahrenheit
End Function
End Class

Thanks again.
Matthew


"Tony Tanzillo" wrote in message
news:4909714@discussion.autodesk.com...
Did you check 'Register for COM Interop' in your
project settings? If not, post your code if it is
not ummmm proprietary.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Darcy" wrote in message
news:4909625@discussion.autodesk.com...
I have compiled a class library that is exposed to com and I can
(setq aa (vla-getinterfaceobject acadobj "ClassLibrary4.NET_Temp"))
#
_$ (vlax-dump-object aa t)
it returns:
; _NET_Temperature: nil
; No properties
; No methods
T

How do I setup the properties and methods to be able to use them from lisp?
I am still trying to implement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Any help would be greatly appreciated.
Mathew
*Matthew
Message 5 of 5 (90 Views)

Re: VLA-object with no properties and methods

07-26-2005 05:08 PM in reply to: *Darcy
Thanks Tony

I posted to the Microsoft news group as well. Someone over there said that
the Strong Name property page was in the Bata, and they took it out of the
final release.

Matthew

"Tony Tanzillo" wrote in message
news:4910636@discussion.autodesk.com...
Search MSDN for the ClassInterfaceType and ProgID attributes.

You're missing those, which is required for a class
that is exposed via COM.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Matthew" wrote in message
news:4910016@discussion.autodesk.com...
I have these attributes:
< assemblykeyfileattribute="">
< assemblytitle="">
< clscompliant="">
< comvisible="">

and a Batch file:
"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\sn.exe" -k
PhysServer2.snk
"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\tlbexp.exe"
PhysServer2.dll /out:smileytongue:hysServer2.tlb
"C:\WINdows\Microsoft.NET\Framework\v1.1.4322\regasm.exe"
/tlb:smileytongue:hysServer2.tlb PhysSERVER2.dll
"C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin\gacutil.exe" /i PhysServer2c.dll

Here is the class. I have checked the 'Register for COM Interop' checkbox.
Public Interface iTemperature
Property Celsius() As Double
Property Fahrenheit() As Double
Function GetCelsius() As Double
Function GetFahrenheit() As Double
End Interface

Public Class NET_Temperature
Implements iTemperature

Private mdblCelsius As Double
Private mdblFahrenheit As Double

Public Property Celsius() As Double _
Implements iTemperature.Celsius
Get
Celsius = mdblCelsius
End Get
Set(ByVal Value As Double)
mdblCelsius = Value
mdblFahrenheit = ((Value * 9) / 5) + 32
End Set
End Property

Public Property Fahrenheit() As Double _
Implements iTemperature.Fahrenheit
Get
Fahrenheit = mdblFahrenheit
End Get
Set(ByVal Value As Double)
mdblFahrenheit = Value
mdblCelsius = ((Value - 32) * 5) / 9
End Set
End Property

Public Function GetCelsius() As Double _
Implements iTemperature.GetCelsius
GetCelsius = mdblCelsius
End Function

Public Function GetFahrenheit() As Double _
Implements iTemperature.GetFahrenheit
GetFahrenheit = mdblFahrenheit
End Function
End Class

Thanks again.
Matthew


"Tony Tanzillo" wrote in message
news:4909714@discussion.autodesk.com...
Did you check 'Register for COM Interop' in your
project settings? If not, post your code if it is
not ummmm proprietary.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Darcy" wrote in message
news:4909625@discussion.autodesk.com...
I have compiled a class library that is exposed to com and I can
(setq aa (vla-getinterfaceobject acadobj "ClassLibrary4.NET_Temp"))
#
_$ (vlax-dump-object aa t)
it returns:
; _NET_Temperature: nil
; No properties
; No methods
T

How do I setup the properties and methods to be able to use them from lisp?
I am still trying to implement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callcomcomp.asp

Any help would be greatly appreciated.
Mathew
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.