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

Newbie 2 Problems c#

3 REPLIES 3
Reply
Message 1 of 4
newbie1221
367 Views, 3 Replies

Newbie 2 Problems c#

I'm using c#
I have 2 problems
1) I want to draw an arc using (3 points) rather than start angle and the end angle provided by method "AddArc" :
Autodesk.AutoCAD.Interop.Common.AcadModelSpaceClass.AddArc(object, double, double, double)

2)I want to know how to interact with the user's selection

e.g: let the user select 2 lines and give me a value then I'll do some calculations based on the lines selected and that value and I'll modify the current drawing based on the calculations i did.

please Help 😞
3 REPLIES 3
Message 2 of 4
Guy Lowndes
in reply to: newbie1221

The constructor for Geometry.CircularArc3D has an overload for three points.

Read through the labs for ObjectArx, they will show you how to get user selections (which is an ObjectID) and get the entity from a transaction, from here you can use the properties to develop your program.

Go to http://arxdummies.blogspot.com/2005/01/welcome.html
or http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=773180
Message 3 of 4
newbie1221
in reply to: newbie1221

Thank you 🙂
Message 4 of 4
jbooth
in reply to: newbie1221

As previously stated, the Autodesk.AutoCAD.Geometry.CircularArc2d class has a constructor overload that you can use to create your arc.

Therefore you can create a new CircularArc2d object using your three points, and pass its radius, startangle, endangle, and centre into your AcadModelSpace.AddArc() method via COM interop.

However you will need to create a .NET dll and netload it into AutoCAD before you can use namespaces like AcDb or AcGe in your code. This is the more difficult part, but there should be other threads in this forum with that information.

I honestly don't remember how to do it myself, since I haven't needed to create a new project in a while (2 years).

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