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

can anyone help me making the dimensions

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
238 Views, 2 Replies

can anyone help me making the dimensions

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(x1,y1, 0)
Dim pt2 As New Point3d(x1,y2,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()
End Using
Return rdid
End Sub
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Hi,

I'm in the same shape you are in. It is hard to find anyone who is really doing AutoCAD Automation. I tried using your code and the dimension line is placed on the 0 x axis. Does this happen with you? If not, how are you calling this routine?

I have been looking for help on this Discussion Group also and I don't think any of these people are really doing automation. They only know Semi-Automation.

Thanks for any help you can give me,
Bob4963
Message 3 of 3
Anonymous
in reply to: Anonymous

I am not very good at reading that VB stuff, but it looks like you might have a typo in your second point, should be x2 and not x1?

Dan the Semi-automaton man

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