Have a look at this mod to that class, for one
approach to automating the "_non" business:
public static int Command( params object[] args )
{
if( AcadApp.DocumentManager.IsApplicationContext )
return 0;
int stat = 0;
int cnt = 0;
using( ResultBuffer buffer = new ResultBuffer() )
{
foreach( object o in args )
{
if( supressOSnap && ( o is Point3d || o is Point2d ) )
buffer.Add( new TypedValue( RTSTR, "_non" ) );
buffer.Add( TypedValueFromObject( o ) );
++cnt;
}
if( cnt > 0 )
stat = acedCmd( buffer.UnmanagedObject );
}
return stat;
}
private static bool supressOSnap = false;
public static bool SupressRunningObjectSnap
{
get
{
return supressOSnap;
}
set
{
supressOSnap = value;
}
}
void Example()
{
CommandLine.SupressRunningObjectSnap = true;
CommandLine.Command("._LINE", new Point3d(2,2,0),
new Point3d(4,12,0), ... );
}
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
wrote in message news:5555160@discussion.autodesk.com...
Yeah it works wonders. The code I use is actually a modified version of your example I found a few weeks ago.
Thanks for the tip on "_non". I totally forgot that I could turn off running snaps temporarily in the middle of a command.
As always, thanks for your assistance, Tony.
Regards,
JB