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

Draw Rectangle

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
kani_mca
4140 Views, 3 Replies

Draw Rectangle

I want to draw a Rectangle in autocad Electrical using VB.net.

how to draw?Please send code for this.

Tags (1)
3 REPLIES 3
Message 2 of 4
Alfred.NESWADBA
in reply to: kani_mca

Hi,

 

download the ObjectARX-kit (>>>from here<<<), there are a lot of dot-net samples using draw-functions and also crreating polylines.

At least a rectangle is a polyline, nothing more.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 4
Hallex
in reply to: Alfred.NESWADBA

You can try this code as well:

http://forums.autodesk.com/t5/NET/Create-Objects-and-then-replace-them-with-userinput/m-p/3434003/hi...

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 4 of 4
DouceDeux
in reply to: kani_mca

As you may know, this is not a language-learning forum (except for obcure methods or structs).

Instead, we ask from other people the logic of how to do something with the AutoCAD object model.

If your question was: How to draw a rectangle?

The answer would be simple: Draw a polyline with four segments in the shape of a rectangle and then set the .Closed boolean property of the polyline to true.

That is exactly what AutoCAD does when you use the command RECTANG;

 

If your question is: How to draw a polyline? It should be already answered in other threads.

 

If you have trouble getting YOUR code to work, come back  here, post your code and explain the desired behavior.

 

P.S. Hold on, did he just say AutoCAD Electrical? Does it use the same API as AutoCAD?

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