In case anyone might found this class useful, here it is (I did it as an example for a friend):
RevCloud - Based on the original Code, idea and concept by David Harrington (from one of the earlier autolisp versions).
Note: it does not save the arc length value for next use.
using System;
using System.Runtime.InteropServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;
//
// Based on the original Code, idea and concept by David Harrington
//
// Code ported to C# by LE OCT.24.2010.
//
namespace RevCloudNET
{
public class RevCloudCommand
{
// ARX: int acedGrRead(int track, int * type, struct resbuf * result);
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
public extern static int acedGrRead(int track, out int display, IntPtr result);
// ARX: int acedCmd(const struct resbuf * rbp);
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl)]
extern static int acedCmd(IntPtr rbp);
const int RTNORM = 5100;
const int RTCAN = -5002;
const short RTSTR = 5005;
const int RT3DPOINT = 5009;
const int RTREAL = 5001;
public static void drawCloud()
{
if (AcadApp.DocumentManager.IsApplicationContext) return;
Database db = HostApplicationServices.WorkingDatabase;
Document doc = AcadApp.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
int status = 0;
double incAngle = 110.0;
double arcDist = 0.0;
if (Convert.ToInt32(AcadApp.GetSystemVariable("DIMSCALE")) == 0)
arcDist = 0.375;
else
arcDist = 0.375 * Convert.ToInt32(AcadApp.GetSystemVariable("DIMSCALE"));
PromptPointResult res = ed.GetPoint("\nPick cloud start point: ");
if (res.Status != PromptStatus.OK) return; ...
Below it is the full source code attached, hope that helps - provided as-is