- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
i'm trying to hatch a dynamic block reference through VBA and i cant get it to work.
A summary of the routine is as follows:
---------------------------------------------------------------------------------------------------------------------------------
Dim BIMOBJ As AcadBlockReference
Set BIMOBJ = ThisDrawing.ModelSpace.InsertBlock(center, BN, 1, 1, 1, Ang) --> (Dont mind those parameters, they work correctly, the block reference is inserted correctly)
Dim objhatch As AcadHatch
Set objhatch = ThisDrawing.ModelSpace.AddHatch(acHatchPatternTypePreDefined, "ANSI31", True, acHatchObject)
Dim OuterLim() As AcadEntity
ReDim OuterLim(0)
--- FROM HERE ON I DONT KNOW WHAT TO DO------
Set OuterLim(0) =BIMOBJ -->>???
Dim blockent As AcadEntity: Set blockent = BIMOBJ
Set OuterLim(0) =blockent -->>???
objhatch.AppendOuterLoop (OuterLim) -->This is the part that is now working. I don tknow how to define a blockreference as OuterLoop
------------------------------------------------------------------------------------------------------------------------------------------------------
By the way, if I command-hatch manualy via autocad modelspace interface, selecting the blockreference, the hatch is done correctly and works great.
Any Ideas?
Thanks!
Solved! Go to Solution.