.NET

Reply
Active Contributor
chikito1990
Posts: 40
Registered: ‎06-26-2013
Message 1 of 6 (921 Views)
Accepted Solution

Draw with ObjectARX and C#

921 Views, 5 Replies
07-31-2013 07:08 AM

Hi al,

 

I have a task to draw a picture(attached in the post) using ObjectARX but the picture is complicated(too many things to take into considerations) and I have no idea how accomplish the task. I will really appreciate if you give me some guidelines so I can see what is the best option. I have to use ObjectARX SDK and C# to do it. 

 

Thank you in advance!

 

Best regards,

Dimitar Georgiev

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 6 (892 Views)

Re: Draw with ObjectARX and C#

07-31-2013 11:17 AM in reply to: chikito1990

Here you go:

http://www.codeproject.com/Articles/10724/Samples-for-DOTNETARX-a-tool-for-AutoCAD-NET-progr

me think it's enough do make your homework

Cheers :smileyhappy:

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Active Contributor
chikito1990
Posts: 40
Registered: ‎06-26-2013
Message 3 of 6 (858 Views)

Re: Draw with ObjectARX and C#

08-02-2013 03:01 AM in reply to: Hallex

HI Hallex,

 

All is really cool but I have some trouble inserting the elements on the picture. I attached a picture with exeption i am getting and i have no idea why i do get it?

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 4 of 6 (840 Views)

Re: Draw with ObjectARX and C#

08-02-2013 03:46 AM in reply to: chikito1990
Post this code block as .txt file,
or just paste directly in this topic,
coz could not test it from your picture,
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Active Contributor
chikito1990
Posts: 40
Registered: ‎06-26-2013
Message 5 of 6 (836 Views)

Re: Draw with ObjectARX and C#

08-02-2013 03:53 AM in reply to: Hallex

I just trying to make the cylinder in the middle:

 

[CommandMethod("PM_Cable")]
        public void CableExporting()
        {
            Point3d ellipseMajorAxis = new Point3d(0.0, 1500.0, 0.0);
            Double ellipseRadiusRatio = 0.4;

            Point3d ellipseLeftCenter = new Point3d(72541.7, 80198.5, 0.0);
            Point3d ellipseRightCenter = new Point3d(77145.7, 80173.6, 0.0);

            Point3d ellipseTopStart = new Point3d(77154.7, 81673.6, 0.0);
            Point3d ellipseTopEnd = new Point3d(72541.7, 81698.5, 0.0);

            Point3d ellipseBottumStart = new Point3d(77154.7, 78673.6, 0.0);
            Point3d ellipseBottumEnd = new Point3d(72578.5, 78701.8, 0.0);

            Ellipses ellipseLeft = new Ellipses(ellipseLeftCenter, ellipseMajorAxis, ellipseRadiusRatio);
            Ellipses ellipseRight = new Ellipses(ellipseRightCenter, ellipseMajorAxis, ellipseRadiusRatio);

            Lines ellipseTop = new Lines(ellipseTopStart, ellipseTopEnd);
            Lines ellipseButtom = new Lines(ellipseBottumStart, ellipseBottumEnd);

            Tools.AddEntities(new Entity[] { ellipseLeft, ellipseRight, ellipseTop, ellipseButtom });
        }

 Thank you for spending your time with my question

Active Contributor
chikito1990
Posts: 40
Registered: ‎06-26-2013
Message 6 of 6 (830 Views)

Re: Draw with ObjectARX and C#

08-02-2013 04:03 AM in reply to: Hallex

Also i am getting this warnings. But as you see from the other picture the .DLL is there.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.