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

Making the rotated dimension with an object.

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
211 Views, 0 Replies

Making the rotated dimension with an object.

I have used this code to make the rotated dimension.this work fine but I didn't understand how I use other methods and properties of the class rotateddimension
could anyone help me with on this problem


Private Function CreateDim(ByVal x1 As Double, ByVal y1 As Double, ByVal x2 As Double, ByVal y2 As Double) As ObjectId
Dim rdid As ObjectId
Dim pt1 As New Point3d(1.0,1.0, 0)
Dim pt2 As New Point3d(10.0, 10.0, 0)
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim tm As DBTransMan = db.TransactionManager
Dim ta As Transaction = tm.StartTransaction()
Dim LT As LayerTable = ta.GetObject(db.LayerTableId, OpenMode.ForRead, False)
Using ta
Dim bt As BlockTable = tm.GetObject(db.BlockTableId, OpenMode.ForRead, False)
Dim btr As BlockTableRecord = tm.GetObject(bt(BlockTableRecord.ModelSpace), OpenMode.ForWrite, False)
Dim rd As New RotatedDimension
rd.XLine1Point = pt1
rd.XLine2Point = pt2
rd.TextAttachment = AttachmentPoint.BottomFit
rdid = btr.AppendEntity(rd)

tm.AddNewlyCreatedDBObject(rd, True)

ta.Commit()
' Dim ent As Entity = CType(ta.GetObject(lineid, OpenMode.ForWrite), Entity)

' Finally ' ent.LayerId = lid
ta.Dispose()
'End Try
'End If
End Using
Return rdid
End Sub
0 REPLIES 0

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