acdbWcs2Ucs in vb.net ?

acdbWcs2Ucs in vb.net ?

Anonymous
Not applicable
519 Views
6 Replies
Message 1 of 7

acdbWcs2Ucs in vb.net ?

Anonymous
Not applicable
Hi,

In C i was using the functions acdbWcs2Ucs to convert from one coordinate
system to another.
Because I can't find the function in VB i've made following function

CallingConvention:=CallingConvention.Cdecl)> _
Public Function acdbUcs2Wcs(ByVal fromPoint As Double(), ByVal toPoint
As Double(), ByVal vector As Boolean) As Integer
End Function
but when i'am using the function Acad crashes.

Any idea ?

Or another solution to convert from WCS2UCS, UCS2WCS, DCS2WCS,.... in vb ?

tnx,

Peter
0 Likes
520 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
EntryPoint:="?acdbUcs2Wcs@@YA_NQAN0_N@Z",
CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Function acdbUcs2Wcs( ByRef inPt As Point3d, ByRef outPt As Point3d, ByVal vec As Boolean) As Boolean
End Function


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Peter Warnez" wrote in message news:5541564@discussion.autodesk.com...
Hi,

In C i was using the functions acdbWcs2Ucs to convert from one coordinate
system to another.
Because I can't find the function in VB i've made following function

CallingConvention:=CallingConvention.Cdecl)> _
Public Function acdbUcs2Wcs(ByVal fromPoint As Double(), ByVal toPoint
As Double(), ByVal vector As Boolean) As Integer
End Function
but when i'am using the function Acad crashes.

Any idea ?

Or another solution to convert from WCS2UCS, UCS2WCS, DCS2WCS,.... in vb ?

tnx,

Peter
0 Likes
Message 3 of 7

Anonymous
Not applicable

Hi. Don't use the declaration I posted in the last
message.

 

Autodesk's news server has mangled it.

 

To call the degree of stupidity and
size=1>ignorance reflected

by the design of Autodesk's online
size=1>discussion groups

astonishing, is an understatement.

 

I'll try it one more time:

 
<DllImport("acdb17.dll", EntryPoint:="?acdbUcs2Wcs@@YA_NQAN0_N@Z", CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Function acdbUcs2Wcs(<Out> ByRef inPt As Point3d, <Out> ByRef outPt As Point3d, ByVal vec As Boolean) As Boolean
End Function
 

--
http://www.caddzone.com

 

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting
AutoCAD 2000 through 2008

size=1>http://www.acadxtabs.com


Hi,

In C i was using the functions
acdbWcs2Ucs to convert from one coordinate
system to another.
Because I
can't find the function in VB i've made following
function

<DllImport("acad.exe", EntryPoint:="acdbUcs2Wcs",

CallingConvention:=CallingConvention.Cdecl)> _
   
Public Function acdbUcs2Wcs(ByVal fromPoint As Double(), ByVal toPoint
As
Double(), ByVal vector As Boolean) As Integer
    End
Function
but when i'am using the function Acad crashes.

Any idea
?

Or another solution to convert from WCS2UCS, UCS2WCS, DCS2WCS,.... in
vb ?

tnx,

Peter
0 Likes
Message 4 of 7

Anonymous
Not applicable
And sorry about all the embedded hyperlinks in the code
(actually it would be great if it lead you to the related
MSDN or other docs, rather than to Lutz Roeder's website).

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Tony Tanzillo" wrote in message news:5541646@discussion.autodesk.com...
Hi. Don't use the declaration I posted in the last message.

Autodesk's news server has mangled it.

To call the degree of stupidity and ignorance reflected
by the design of Autodesk's online discussion groups
astonishing, is an understatement.

I'll try it one more time:

_
Public Shared Function acdbUcs2Wcs( ByRef inPt As Point3d, ByRef outPt As Point3d, ByVal vec As Boolean) As BooleanEnd Function
-- http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Peter Warnez" wrote in message news:5541564@discussion.autodesk.com...
Hi,

In C i was using the functions acdbWcs2Ucs to convert from one coordinate
system to another.
Because I can't find the function in VB i've made following function

CallingConvention:=CallingConvention.Cdecl)> _
Public Function acdbUcs2Wcs(ByVal fromPoint As Double(), ByVal toPoint
As Double(), ByVal vector As Boolean) As Integer
End Function
but when i'am using the function Acad crashes.

Any idea ?

Or another solution to convert from WCS2UCS, UCS2WCS, DCS2WCS,.... in vb ?

tnx,

Peter
0 Likes
Message 5 of 7

Anonymous
Not applicable
Tnx a lot
Where can I find all that kind of stuff ?
If don't understand the way the function works....

greetings,

Peter


"Tony Tanzillo" schreef in bericht
news:5541652@discussion.autodesk.com...
And sorry about all the embedded hyperlinks in the code
(actually it would be great if it lead you to the related
MSDN or other docs, rather than to Lutz Roeder's website).

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Tony Tanzillo" wrote in message
news:5541646@discussion.autodesk.com...
Hi. Don't use the declaration I posted in the last message.

Autodesk's news server has mangled it.

To call the degree of stupidity and ignorance reflected
by the design of Autodesk's online discussion groups
astonishing, is an understatement.

I'll try it one more time:

CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Function acdbUcs2Wcs( ByRef inPt As Point3d, ByRef
outPt As Point3d, ByVal vec As Boolean) As BooleanEnd Function
-- http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Peter Warnez" wrote in message
news:5541564@discussion.autodesk.com...
Hi,

In C i was using the functions acdbWcs2Ucs to convert from one coordinate
system to another.
Because I can't find the function in VB i've made following function

CallingConvention:=CallingConvention.Cdecl)> _
Public Function acdbUcs2Wcs(ByVal fromPoint As Double(), ByVal toPoint
As Double(), ByVal vector As Boolean) As Integer
End Function
but when i'am using the function Acad crashes.

Any idea ?

Or another solution to convert from WCS2UCS, UCS2WCS, DCS2WCS,.... in vb ?

tnx,

Peter
0 Likes
Message 6 of 7

Anonymous
Not applicable
Read this topic: http://through-the-interface.typepad.com/through_the_interface/2006/07/calling_objecta.html
0 Likes
Message 7 of 7

Anonymous
Not applicable
You can use Depends.exe to look up exported functions
and their signatures.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Peter Warnez" wrote in message news:5541748@discussion.autodesk.com...
Tnx a lot
Where can I find all that kind of stuff ?
If don't understand the way the function works....

greetings,

Peter


"Tony Tanzillo" schreef in bericht
news:5541652@discussion.autodesk.com...
And sorry about all the embedded hyperlinks in the code
(actually it would be great if it lead you to the related
MSDN or other docs, rather than to Lutz Roeder's website).

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Tony Tanzillo" wrote in message
news:5541646@discussion.autodesk.com...
Hi. Don't use the declaration I posted in the last message.

Autodesk's news server has mangled it.

To call the degree of stupidity and ignorance reflected
by the design of Autodesk's online discussion groups
astonishing, is an understatement.

I'll try it one more time:

CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Function acdbUcs2Wcs( ByRef inPt As Point3d, ByRef
outPt As Point3d, ByVal vec As Boolean) As BooleanEnd Function
-- http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Peter Warnez" wrote in message
news:5541564@discussion.autodesk.com...
Hi,

In C i was using the functions acdbWcs2Ucs to convert from one coordinate
system to another.
Because I can't find the function in VB i've made following function

CallingConvention:=CallingConvention.Cdecl)> _
Public Function acdbUcs2Wcs(ByVal fromPoint As Double(), ByVal toPoint
As Double(), ByVal vector As Boolean) As Integer
End Function
but when i'am using the function Acad crashes.

Any idea ?

Or another solution to convert from WCS2UCS, UCS2WCS, DCS2WCS,.... in vb ?

tnx,

Peter
0 Likes