Author Topic: Lastangle  (Read 2591 times)

0 Members and 1 Guest are viewing this topic.

Bryco

  • Water Moccasin
  • Posts: 1883
Lastangle
« on: December 09, 2007, 04:12:41 PM »
Where do you find this?

Glenn R

  • Guest
Re: Lastangle
« Reply #1 on: December 09, 2007, 04:59:58 PM »
?

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Lastangle
« Reply #2 on: December 09, 2007, 05:02:00 PM »
You mean the equivalent to --

(getvar "lastangle")

?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Bryco

  • Water Moccasin
  • Posts: 1883
Re: Lastangle
« Reply #3 on: December 09, 2007, 05:03:30 PM »
wasn't very descriptive i see now.
There is a setvar Lastpoint
and lastangle
Mp-yes

Glenn R

  • Guest
Re: Lastangle
« Reply #4 on: December 09, 2007, 05:09:09 PM »
Quick and nasty:

Code: [Select]
using System;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;

using acadApp = Autodesk.AutoCAD.ApplicationServices.Application;

[assembly: CommandClass(typeof(BrycoLastAng.tcgsCommands))]

namespace BrycoLastAng {
/// <summary>
/// Summary description for tcgsCommands.
/// </summary>
public class tcgsCommands {
public tcgsCommands() {
//
// TODO: Add constructor logic here
//
}

// Define Command "AsdkCmd1"
[CommandMethod("BrycoLastAngle")]
static public void brycolastanglecommand() // This method can have any name
{
Document doc = acadApp.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;

double lastAngle = (double)acadApp.GetSystemVariable("LASTANGLE");

ed.WriteMessage("\nValue of 'LASTANGLE' system variable: {0}", lastAngle);
}

}
}

Cheers,
Glenn in UK.

Bryco

  • Water Moccasin
  • Posts: 1883
Re: Lastangle
« Reply #5 on: December 09, 2007, 05:16:28 PM »
Thanks mate (damn you are quick)
I didn't know there was a GetSystemVariable.

I'm still plodding along with a polyline jig and as far as I can see acad uses this to start a polyarc when only one point has been picked