.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

acedcommand help

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
528 Views, 5 Replies

acedcommand help

how do i declare thie function using vb.net,
Private Declare Auto Function acedCommand... what then??
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

As I know it is impossible to P/Invoke function with variable number of arguments. Try instead P/Invoke acedCmd.
Message 3 of 6
Anonymous
in reply to: Anonymous

actually i use this signature and it's work !!
Private Declare Auto Function acedCommand Lib "acad.exe" (ByVal int As Integer, ByVal str As String, ByVal int1 As Integer) As Integer
Message 4 of 6
Anonymous
in reply to: Anonymous

wrote:

>> As I know it is impossible to P/Invoke function with
>> variable number of arguments.

public class EntryPoint
{
[DllImport("msvcrt.dll", CharSet=CharSet.Ansi,
CallingConvention=CallingConvention.Cdecl)]

extern static int printf(string format, __arglist);

public static void Main(String[] args)
{
printf("%d rows, %d columns", __arglist(12, 26) );
}
}

And, you could use it to P/Invoke acedCommand, acutPrintf,
and so on, but since there is acedCmd(), it isn't necessary.

There are a few undocumented methods exported by
AutoCAD that take varargs, which this can be handy for.

--
http://www.caddzone.com

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

wrote in message news:5722983@discussion.autodesk.com...
As I know it is impossible to P/Invoke function with variable number of arguments. Try instead P/Invoke acedCmd.
Message 5 of 6
Anonymous
in reply to: Anonymous

http://www.caddzone.com/CommandLine.vb

--
http://www.caddzone.com

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

wrote in message news:5722735@discussion.autodesk.com...
how do i declare thie function using vb.net,
Private Declare Auto Function acedCommand... what then??
Message 6 of 6
Anonymous
in reply to: Anonymous

Thank you, Tony!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost