Code: Select all
Public Sub DesenharPlanta()
Dim doc As IntelliCAD.ApplicationServices.Document = Core.Application.DocumentManager.MdiActiveDocument
Dim db As Teigha.DatabaseServices.Database = doc.Database
Dim ed As Editor = doc.Editor
Dim u As New Utilidade
Dim col As New List(Of ObjectId)
Dim colPerfil As New List(Of ObjectId)
''doc.Window.Focus()
'ObterPontos()
Try
Using acLock As DocumentLock = doc.LockDocument()
Using tr As Transaction = db.TransactionManager.StartTransaction()
Dim acBlkTbl As BlockTable = tr.GetObject(db.BlockTableId, Teigha.DatabaseServices.OpenMode.ForRead)
Dim acBlkTblRec As BlockTableRecord = tr.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), Teigha.DatabaseServices.OpenMode.ForWrite)
If Not IsNothing(m_pt1) AndAlso Not IsNothing(m_pt2) Then
Dim ptsMesa As New Point3dCollection
Dim ptsMesa2 As New Point3dCollection
Dim ptsAlma As New Point3dCollection
Dim ptsAlma2 As New Point3dCollection
Dim ptsHatch As New Point3dCollection
Dim ml As Mline = New Mline()
ml.SetDatabaseDefaults()
Dim PLinhaMesa As New Polyline
PLinhaMesa.SetDatabaseDefaults()
Dim PLinhaMesa2 As New Polyline
PLinhaMesa2.SetDatabaseDefaults()
Dim PLinhaAlma As New Polyline
PLinhaAlma.SetDatabaseDefaults()
Dim PLinhaAlma2 As New Polyline
PLinhaAlma2.SetDatabaseDefaults()
Dim PLinhaHatch As New Polyline
PLinhaHatch.SetDatabaseDefaults()
Dim LinhaDeCentro As Line = New Line(m_pt1, m_pt2)
LinhaDeCentro.SetDatabaseDefaults()
Dim acLineTypTbl As LinetypeTable
Dim sLineTypName As String
Select Case Tipo
#Region "trilho"
Case cTiposDePerfil.Trilho
CreateMLineStyleW(Descricao, bf, tw)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(m_pt1)
ml.AppendSegment(m_pt2)
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
colPerfil.Add(ml.ObjectId)
#End Region
#Region "Redondos"
Case cTiposDePerfil.Redondos
#Region "Revisão 10/1/19"
CreateMLineStyleRedondos(Descricao, bf)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(m_pt1)
ml.AppendSegment(m_pt2)
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
colPerfil.Add(ml.ObjectId)
#End Region
#Region "Antigo"
'Dim objId As ObjectId = utilidade.addLine(m_pt1, m_pt2)
'col.Add(objId)
''obter o angulo
'LinhaDeCentro = tr.GetObject(objId, teigha.DatabaseServices.OpenMode.ForRead)
'Dim Ang As Double = LinhaDeCentro.Angle
'Dim pt3 As Point3d = utilidade.GetPointAtDist(m_pt1, Math.PI * 3 / 2 + Ang, bf / 2)
'Dim pt4 As Point3d = utilidade.GetPointAtDist(m_pt2, Math.PI * 3 / 2 + Ang, bf / 2)
'ptsMesa.Add(pt3)
'ptsMesa.Add(pt4)
'pt3 = utilidade.GetPointAtDist(m_pt1, Math.PI / 2 + Ang, bf / 2)
'pt4 = utilidade.GetPointAtDist(m_pt2, Math.PI / 2 + Ang, bf / 2)
'ptsMesa.Add(pt4)
'ptsMesa.Add(pt3)
'ptsAlma2.Add(pt3)
'ptsAlma2.Add(pt4)
'acBlkTblRec.AppendEntity(PLinhaMesa)
'tr.AddNewlyCreatedDBObject(PLinhaMesa, True)
'Dim i As Integer = 0
'For Each pt As Point3d In ptsMesa
' PLinhaMesa.AddVertexAt(i, New Point2d(pt.X, pt.Y), 0, 0, 0)
' i += 1
'Next
'PLinhaMesa.Closed = True
'PLinhaMesa.Layer = LayerMesa
'col.Add(PLinhaMesa.ObjectId)
#End Region
#End Region
#Region "Chatos"
Case cTiposDePerfil.Chatos
#Region "Revisão 10/1/19"
CreateMLineStyleChatos(Descricao, bf)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(m_pt1)
ml.AppendSegment(m_pt2)
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
colPerfil.Add(ml.ObjectId)
#End Region
#End Region
#Region "UDC duplo"
Case cTiposDePerfil.UDC_Duplo
#Region "Revisão 10/1/19"
CreateMLineStyleUDCDuplo(Descricao, bf, tw)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(m_pt1)
ml.AppendSegment(m_pt2)
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
colPerfil.Add(ml.ObjectId)
#End Region
#End Region
#Region "CE Composto"
Case cTiposDePerfil.CE_COMPOSTO
Dim objId As ObjectId = Utilidade.addLine(m_pt1, m_pt2)
col.Add(objId)
colPerfil.Add(objId)
'obter o angulo
#Region "LADO ESQUERDO"
LinhaDeCentro = tr.GetObject(objId, Teigha.DatabaseServices.OpenMode.ForRead)
Dim Ang As Double = LinhaDeCentro.Angle
Dim pt3 As Point3d '= utilidade.GetPointAtDist(m_pt1, Math.PI / 2 + Ang, bf)
Dim pt4 As Point3d '= utilidade.GetPointAtDist(m_pt2, Math.PI / 2 + Ang, bf)
ptsMesa.Add(m_pt1)
ptsMesa.Add(m_pt2)
pt3 = Utilidade.GetPointAtDist(m_pt1, Math.PI / 2 + Ang, bf)
pt4 = Utilidade.GetPointAtDist(m_pt2, Math.PI / 2 + Ang, bf)
ptsMesa.Add(pt4)
ptsMesa.Add(pt3)
pt3 = Utilidade.GetPointAtDist(m_pt1, Math.PI / 2 + Ang, tw)
pt4 = Utilidade.GetPointAtDist(m_pt2, Math.PI / 2 + Ang, tw)
ptsAlma.Add(pt3)
ptsAlma.Add(pt4)
pt3 = Utilidade.GetPointAtDist(m_pt1, Math.PI / 2 + Ang, bf - tw)
pt4 = Utilidade.GetPointAtDist(m_pt2, Math.PI / 2 + Ang, bf - tw)
ptsAlma.Add(pt4)
ptsAlma.Add(pt3)
acBlkTblRec.AppendEntity(PLinhaMesa)
tr.AddNewlyCreatedDBObject(PLinhaMesa, True)
Dim i As Integer = 0
For Each pt As Point3d In ptsMesa
PLinhaMesa.AddVertexAt(i, New Point2d(pt.X, pt.Y), 0, 0, 0)
i += 1
Next
PLinhaMesa.Closed = True
PLinhaMesa.Layer = LayerMesa
col.Add(PLinhaMesa.ObjectId)
colPerfil.Add(PLinhaMesa.ObjectId)
acBlkTblRec.AppendEntity(PLinhaAlma)
tr.AddNewlyCreatedDBObject(PLinhaAlma, True)
i = 0
For Each pt As Point3d In ptsAlma
PLinhaAlma.AddVertexAt(i, New Point2d(pt.X, pt.Y), 0, 0, 0)
i += 1
Next
PLinhaAlma.Closed = True
PLinhaAlma.Layer = LayerAlma
col.Add(PLinhaAlma.ObjectId)
colPerfil.Add(PLinhaAlma.ObjectId)
#End Region
#Region "LADO DIREITO"
ptsMesa = New Point3dCollection
ptsMesa.Add(m_pt1)
ptsMesa.Add(m_pt2)
pt3 = Utilidade.GetPointAtDist(m_pt1, Math.PI * 3 / 2 + Ang, bf)
pt4 = Utilidade.GetPointAtDist(m_pt2, Math.PI * 3 / 2 + Ang, bf)
ptsMesa.Add(pt4)
ptsMesa.Add(pt3)
pt3 = Utilidade.GetPointAtDist(m_pt1, Math.PI * 3 / 2 + Ang, tw)
pt4 = Utilidade.GetPointAtDist(m_pt2, Math.PI * 3 / 2 + Ang, tw)
ptsAlma = New Point3dCollection
ptsAlma.Add(pt3)
ptsAlma.Add(pt4)
pt3 = Utilidade.GetPointAtDist(m_pt1, Math.PI * 3 / 2 + Ang, bf - tw)
pt4 = Utilidade.GetPointAtDist(m_pt2, Math.PI * 3 / 2 + Ang, bf - tw)
ptsAlma.Add(pt4)
ptsAlma.Add(pt3)
PLinhaMesa = New Polyline
PLinhaMesa.SetDatabaseDefaults()
acBlkTblRec.AppendEntity(PLinhaMesa)
tr.AddNewlyCreatedDBObject(PLinhaMesa, True)
i = 0
For Each pt As Point3d In ptsMesa
PLinhaMesa.AddVertexAt(i, New Point2d(pt.X, pt.Y), 0, 0, 0)
i += 1
Next
PLinhaMesa.Closed = True
PLinhaMesa.Layer = LayerMesa
col.Add(PLinhaMesa.ObjectId)
colPerfil.Add(PLinhaMesa.ObjectId)
PLinhaAlma = New Polyline
PLinhaAlma.SetDatabaseDefaults()
acBlkTblRec.AppendEntity(PLinhaAlma)
tr.AddNewlyCreatedDBObject(PLinhaAlma, True)
i = 0
For Each pt As Point3d In ptsAlma
PLinhaAlma.AddVertexAt(i, New Point2d(pt.X, pt.Y), 0, 0, 0)
i += 1
Next
PLinhaAlma.Closed = True
PLinhaAlma.Layer = LayerAlma
col.Add(PLinhaAlma.ObjectId)
#End Region
#End Region
#Region "CLaminado"
#End Region
#Region "UDC rigido, UE, Eu Duplo"
#End Region
#Region "UDC"
Case cTiposDePerfil.UDC, cTiposDePerfil.UDCRigido, cTiposDePerfil.UE, cTiposDePerfil.UE_duplo,
cTiposDePerfil.Chapeu, cTiposDePerfil.Z, cTiposDePerfil.Ze
#Region "Revisão 10/1/19"
CreateMLineStyleUDC_Planta(Descricao, bf, tf)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(m_pt1)
ml.AppendSegment(m_pt2)
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
colPerfil.Add(ml.ObjectId)
#End Region
#End Region
#Region "Tubo Retangular"
Case cTiposDePerfil.TuboRetangular, cTiposDePerfil.TuboCircular, cTiposDePerfil.TuboQuadrado, cTiposDePerfil.TuboAL
#Region "Revisão 10/1/19"
CreateMLineStyleTubos(Descricao, bf, tf)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(m_pt1)
ml.AppendSegment(m_pt2)
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
colPerfil.Add(ml.ObjectId)
#End Region
#End Region
#Region "Tubo Quadrado"
#End Region
#Region "Tubo Circular"
#End Region
#Region "Cantoneira"
Case cTiposDePerfil.Cantoneira, cTiposDePerfil.CantoneiraDesigual, cTiposDePerfil.CantoneiraAL, cTiposDePerfil.CantoneiraDupla
CreateMLineStyleCantoneira(Descricao, bf, tw)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(m_pt1)
ml.AppendSegment(m_pt2)
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
colPerfil.Add(ml.ObjectId)
#End Region
#Region "W, Cs, CVS, VS"
Case cTiposDePerfil.VigaW, cTiposDePerfil.VS, cTiposDePerfil.CVS, cTiposDePerfil.CS
#Region "Revisão 10/1/19"
CreateMLineStyleW(Descricao, bw, tw)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(m_pt1)
ml.AppendSegment(m_pt2)
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
colPerfil.Add(ml.ObjectId)
#End Region
'' Open the Linetype table for read
#End Region
#Region "Chapeu"
#End Region
#Region "Z"
Case cTiposDePerfil.Z
#End Region
#Region "Ze"
Case cTiposDePerfil.Ze
#End Region
Case cTiposDePerfil.Trelica
#Region "Treliça"
Dim idAux As Integer = IdBanzo
Dim Per As New clsPerfiltabela(idAux)
CreateMLineStyleCantoneira(Per.Descricao, Per.bf, Per.tw)
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
Dim LineSeg As New Line(m_pt2, m_pt1)
ml.AppendSegment(Utilidade.GetPointAtDist(m_pt2, Math.PI / 2 + LineSeg.Angle, Espacador / 2 + Per.bf / 2))
ml.AppendSegment(Utilidade.GetPointAtDist(m_pt1, Math.PI / 2 + LineSeg.Angle, Espacador / 2 + Per.bf / 2))
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
ml = New Mline
ml.Style = db.CmlstyleID
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(Utilidade.GetPointAtDist(m_pt1, Math.PI / 2 * 3 + LineSeg.Angle, Espacador / 2 + Per.bf / 2))
ml.AppendSegment(Utilidade.GetPointAtDist(m_pt2, Math.PI / 2 * 3 + LineSeg.Angle, Espacador / 2 + Per.bf / 2))
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
tr.TransactionManager.QueueForGraphicsFlush()
col.Add(ml.ObjectId)
#End Region
#Region "Joist"
Case cTiposDePerfil.Joist
Dim idAux As Integer = IdBanzo
Dim Banzo As New clsPerfiltabela(idAux)
Dim Diagonal As New clsPerfiltabela(IdDiagonal)
CreateMLineStyleCantoneira(Diagonal.Descricao, Diagonal.bf, Diagonal.tw)
Dim StyleDiagonal As ObjectId = db.CmlstyleID
CreateMLineStyleCantoneira(Banzo.Descricao, Banzo.bf, Banzo.tw)
Dim StyleBanzo As ObjectId = db.CmlstyleID
ml.Style = StyleBanzo
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
Dim LineSeg As New Line(m_pt1, m_pt2)
m_pt2 = New Point3d(m_pt1.X + LineSeg.Length, m_pt1.Y, m_pt1.Z)
ml.AppendSegment(Utilidade.GetPointAtDist(m_pt1, Math.PI / 2 * 3, (Banzo.bf / 2 + Espacador / 2)))
ml.AppendSegment(Utilidade.GetPointAtDist(m_pt2, Math.PI / 2 * 3, (Banzo.bf / 2 + Espacador / 2)))
Dim btr As BlockTableRecord = CType(tr.GetObject(db.CurrentSpaceId, Teigha.DatabaseServices.OpenMode.ForWrite), BlockTableRecord)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
Dim XP As New XPerfil
XP.Entity = ml
XP.ID = Banzo.Id
XP.Commit()
col.Add(ml.ObjectId)
ml = New Mline
ml.Style = StyleBanzo
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
ml.AppendSegment(Utilidade.GetPointAtDist(m_pt2, Math.PI / 2, (Banzo.bf / 2 + Espacador / 2)))
ml.AppendSegment(Utilidade.GetPointAtDist(m_pt1, Math.PI / 2, (Banzo.bf / 2 + Espacador / 2)))
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
XP = New XPerfil
XP.Entity = ml
XP.ID = Banzo.Id
XP.Commit()
col.Add(ml.ObjectId)
Dim pt1 As New Point3d(m_pt1.X + Banzo.bf / 2, m_pt1.Y - (Banzo.bf + Espacador / 2), m_pt1.Z)
Dim pt2 As New Point3d(m_pt1.X + (Banzo.bf + Espacador) + Banzo.bf / 2, m_pt1.Y + (Banzo.bf + Espacador / 2), m_pt1.Z)
Dim contador As Integer = Math.Floor(LineSeg.Length / (Banzo.bf + Espacador))
For i As Integer = 1 To contador
ml = New Mline
ml.Style = StyleDiagonal
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
LineSeg = New Line(pt1, pt2)
ml.AppendSegment(Utilidade.GetPointAtDist(pt2, LineSeg.Angle + Math.PI, Banzo.bf * 2 ^ 0.5))
ml.AppendSegment(Utilidade.GetPointAtDist(pt1, LineSeg.Angle, Banzo.bf * 2 ^ 0.5))
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
XP = New XPerfil
XP.Entity = ml
XP.ID = Diagonal.Id
XP.Commit()
col.Add(ml.ObjectId)
ml = New Mline
ml.Style = StyleDiagonal
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
LineSeg = New Line(pt1, pt2)
ml.AppendSegment(New Point3d(pt1.X, pt2.Y, pt1.Z))
ml.AppendSegment(pt1)
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
XP = New XPerfil
XP.Entity = ml
XP.ID = Diagonal.Id
XP.Commit()
col.Add(ml.ObjectId)
pt1 = New Point3d(pt1.X + (Banzo.bf + Espacador), pt1.Y, pt1.Z)
pt2 = New Point3d(pt2.X + (Banzo.bf + Espacador), pt2.Y, pt2.Z)
Next
' última diagonal e montante
pt2 = New Point3d(m_pt2.X, pt2.Y, pt2.Z)
'diagonal
ml = New Mline
ml.Style = StyleDiagonal
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
LineSeg = New Line(pt1, pt2)
ml.AppendSegment(Utilidade.GetPointAtDist(pt1, LineSeg.Angle, Banzo.bf * 2 ^ 0.5))
ml.AppendSegment(Utilidade.GetPointAtDist(pt2, LineSeg.Angle + Math.PI, Banzo.bf * 2 ^ 0.5))
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
XP = New XPerfil
XP.Entity = ml
XP.ID = Diagonal.Id
XP.Commit()
col.Add(ml.ObjectId)
' montante
ml = New Mline
ml.Style = StyleDiagonal
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
LineSeg = New Line(pt1, New Point3d(pt1.X, pt2.Y, pt2.Z))
ml.AppendSegment(pt1)
ml.AppendSegment(New Point3d(pt1.X, pt2.Y, pt1.Z))
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
XP = New XPerfil
XP.Entity = ml
XP.ID = Diagonal.Id
XP.Commit()
col.Add(ml.ObjectId)
'montante final
ml = New Mline
ml.Style = StyleDiagonal
ml.Normal = Vector3d.ZAxis
ml.Justification = MlineJustification.Zero
LineSeg = New Line(pt1, pt2)
ml.AppendSegment(New Point3d(pt2.X - Banzo.bf / 2, pt1.Y, pt1.Z))
ml.AppendSegment(New Point3d(pt2.X - Banzo.bf / 2, pt2.Y, pt2.Z))
btr.AppendEntity(ml)
tr.AddNewlyCreatedDBObject(ml, True)
XP = New XPerfil
XP.Entity = ml
XP.ID = Diagonal.Id
XP.Commit()
col.Add(ml.ObjectId)
#End Region
End Select
sLineTypName = Linhas.Center
acLineTypTbl = tr.GetObject(IntelliCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.LinetypeTableId,
Teigha.DatabaseServices.OpenMode.ForRead)
Dim LineTypesPath As String = IntelliCAD.ApplicationServices.Application.GetSystemVariable("LINETYPESPATH")
Dim path As String = String.Format("{0}\{1}", LineTypesPath, "Icad.lin")
If acLineTypTbl.Has(sLineTypName) = False Then
'' Load the Center Linetype
IntelliCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.LoadLineTypeFile(sLineTypName, path)
End If
sLineTypName = Linhas.Dashed
#Region "xdata"
Utilidade.AddRegAppTableRecord(Aplicativos.Grelha.Perfil)
Dim rb As New ResultBuffer
Dim rb2 As ResultBuffer = New ResultBuffer
rb2.Add(New TypedValue(DxfCode.ExtendedDataAsciiString, vId.ToString(New CultureInfo("pt-br"))))
rb.Add(New TypedValue(DxfCode.ExtendedDataRegAppName, Aplicativos.Grelha.Perfil))
rb.Add(New TypedValue(DxfCode.ExtendedDataAsciiString, vId.ToString(New CultureInfo("pt-br"))))
ml.XData = rb
#End Region
#Region "HATCH"
#End Region
Colect = New ObjectIdCollection
For Each c As ObjectId In colPerfil
Colect.Add(c)
Dim XP As New XPerfil
XP.Entity = c.GetObject(Teigha.DatabaseServices.OpenMode.ForWrite)
XP.ID = vId
XP.Commit()
Dim XV As New XVista
XV.Entity = XP.Entity
XV.Vista = Vistas.Planta
XV.commit()
Next
Dim baseWcs As Point3d = m_pto_base.TransformBy(ed.CurrentUserCoordinateSystem)
Dim jigger As New AcadNetAddinCS.MoveRotationScaleJig(m_pto_base)
If isJigger Then
For Each id As ObjectId In col
Dim ent As Entity = DirectCast(tr.GetObject(id, Teigha.DatabaseServices.OpenMode.ForWrite), Entity)
ent.XData = Xdata()
jigger.AddEntity(ent)
Next
If jigger.Jig() Then
jigger.TransformEntities()
End If
End If
m_angle = LinhaDeCentro.Angle
ptsMesa.Dispose()
ptsMesa2.Dispose()
ptsAlma.Dispose()
ptsAlma2.Dispose()
ptsHatch.Dispose()
End If
tr.Commit()
End Using
End Using
Catch ex As System.Exception
MsgBox(String.Format("Erro: {0} {1} {2}", ex.Message, ex.Source, ex.StackTrace), MsgBoxStyle.Critical, "Erro de seleção de vigas")
Finally
End Try
End Sub