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

draw the line and pline

4 REPLIES 4
Reply
Message 1 of 5
nlvvch
489 Views, 4 Replies

draw the line and pline

please help me iam learning stage i did make mistache below code please correct them or else
please give some code for adding line antity and pline entity in atocad current view

try
{
Trans = MyDb.TransactionManager.StartTransaction();
lne = new Line2d(prPointRes.Value,prPointRes1.Value);
Bt = (BlockTable)Trans.GetObject(MyDb.BlockTableId,OpenMode.ForRead);
Btr = (BlockTableRecord)Trans.GetObject(MyDb.CurrentSpaceId,OpenMode.ForWrite);

Btr.AppendEntity(lne);
Trans.AddNewlyCreatedDBObject(lne,true);
Trans.Commit();
Trans.Dispose();


}
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: nlvvch

You (or Acad) draw(s) "Line", not Line2d.

Line is Acad's Database residing object with such base
classes ->Curve->Entity->DBObject->Drawable-RXObject..., while Line2d is
geometric representation of a 2D line with this base class
chain ->LinearEntity2d->Curve2d->Entity2d->DisposableWrapper....

Notice Line is Drawable and DBObject, while Line2d is not.


wrote in message news:5620479@discussion.autodesk.com...
please help me iam learning stage i did make mistache below code please
correct them or else
please give some code for adding line antity and pline entity in atocad
current view

try
{
Trans = MyDb.TransactionManager.StartTransaction();
lne = new Line2d(prPointRes.Value,prPointRes1.Value);
Bt = (BlockTable)Trans.GetObject(MyDb.BlockTableId,OpenMode.ForRead);
Btr =
(BlockTableRecord)Trans.GetObject(MyDb.CurrentSpaceId,OpenMode.ForWrite);

Btr.AppendEntity(lne);
Trans.AddNewlyCreatedDBObject(lne,true);
Trans.Commit();
Trans.Dispose();


}
Message 3 of 5
nlvvch
in reply to: nlvvch

hi sir please cane u give one sample for draw the simple line or pline
Message 4 of 5
Anonymous
in reply to: nlvvch

See function 'DrawLine' written by Mikko
in this thread:
http://discussion.autodesk.com/thread.jspa?messageID=4871486

~'J'~
Message 5 of 5
nlvvch
in reply to: nlvvch

hi friends

thanx for ur reply

venkaesh

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