Hallo Alfred,
ich dachte es gibt eine einfachere Lösung. Egal, so geht es auch.
Ich bin mir zwar nicht sicher warum, aber der unten stehende Code funktioniert.
Danke, Theo
Public Sub Dreieck()
Dim mySolid As AcadSolid
P0 = ThisDrawing.Utility.GetPoint(, "Erster Punkt:")
P1 = ThisDrawing.Utility.GetPoint(, "Zweiter Punkt:")
P2 = ThisDrawing.Utility.GetPoint(, "Dritter Punkt:")
Set Mylayout = ThisDrawing.ActiveLayout.Block
Set mySolid = Mylayout.AddSolid(P0, P1, P2, P2)
NachUnten mySolid
End Sub
Public Sub NachUnten(Objekt As AcadObject)
Dim arr(0) As AcadObject
Dim eDictionary As Object
Dim sentityObj As Object
Set eDictionary = ThisDrawing.ModelSpace.GetExtensionDictionary
Set eDictionary = Mylayout.GetExtensionDictionary
On Error Resume Next
Set sentityObj = eDictionary.GetObject("ACAD_SORTENTS")
If Err.Number <> 0 Then
If sentityObj Is Nothing Then
Set sentityObj = eDictionary.AddObject("ACAD_SORTENTS", "AcDbSortentsTable")
End If
Err.Clear
End If
On Error GoTo 0
Set arr(0) = ThisDrawing.ObjectIdToObject(Objekt.ObjectID)
sentityObj.MoveToBottom arr
End Sub
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP