Create a Hatch with 2 innerloop

Discussion in 'AutoCAD' started by jai, Sep 29, 2004.

  1. jai

    jai Guest

    Hi all
    How create a Hatch with 2 innerloop,

    My code is :

    With ThisDrawing.ModelSpace
    Set objEnt = .AddHatch(acHatchPatternTypePreDefined, "LINE", True)
    objEnt.PatternScale = 0.6 / 3.175 'Escala para que de 0.6
    objEnt.PatternAngle = 3.1416 / 2

    Dim lW As AcadObject

    'Selecciono el exterior de la polilinea
    Set lW = ThisDrawing.HandleToObject(id_area(0, 0))
    Set outerLoop(0) = lW
    objEnt.AppendOuterLoop (outerLoop)

    'Relizo un bucle con las poli interiores

    Set lW = ThisDrawing.HandleToObject(id_area(1, 0))
    Set innerLoop(0) = lW
    Set lW = ThisDrawing.HandleToObject(id_area(2, 0))
    Set innerLoop(1) = lW

    objEnt.AppendInnerLoop (innerLoop) 'CRASH / Eror

    objEnt.Evaluate
    objEnt.Update

    Sorry my english
     
    jai, Sep 29, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.