Hallo an alle Hab ein kleines Problem möchte einfach wieder dei Assoziativität einer Schraffur Wiederherstellen und habs wie unten probiert
Zuerst klick ich die alte Schraffur an (Lies die Eigenschaften aus)
und dann die Polylinien (sind geschlossene Polylinien)
Bekomme falsche Eingabe??
PS Wenn ich nur ein Objekt anklicke gehts schon!
Was mache ich falsch?
Sub Reassoz_Schraffur()
Dim hatchObj 'As AcadHatch
Dim patternName As String
Dim PatternType As Long
Dim bAssociativity As Boolean
Dim outerLoop() As AcadEntity, a, Innerloop()
Dim ssetx
Call Autocad_Tools.InitSset
Set ssetx = Autocad_Tools.SSETG
' Define the hatch
patternName = ssetx(0).patternName '"ANSI31"
PatternType = ssetx(0).PatternType '0
bAssociativity = True
' Create the associative Hatch object
Set hatchObj = ThisDrawing.Modelspace.AddHatch(PatternType, patternName, bAssociativity)
Call Autocad_Tools.InitSset
Set ssetx = Autocad_Tools.SSETG
ReDim Preserve outerLoop(0 To ssetx.count - 1) As AcadEntity
Debug.Print ssetx.count
For a = 0 To ssetx.count - 1
Set outerLoop(a) = ssetx.Item(a)
Next a
hatchObj.AppendOuterLoop (outerLoop)
hatchObj.Evaluate
Update
ThisDrawing.Regen True
End Sub
[Diese Nachricht wurde von c.schojer am 09. Apr. 2008 editiert.]
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP