entmaking a hatch within a block def

Discussion in 'AutoCAD' started by Jamie Duncan, Jan 20, 2004.

  1. Jamie Duncan

    Jamie Duncan Guest

    here's the code fragment - please help

    (if (null (tblsearch "block" "arctwallwasher"));;;wallwasher
    (progn
    (entmake '((0 . "BLOCK")(2 . "arctwallwasher")(70 .
    0)(10 0.0 0.0 0.0)))
    (entmake '((0 . "LINE")(8 . "0")(10 0.0 -4.25 0.0)(11
    0.0 4.25 0.0)))
    (setq en1 (entlast))
    (entmake '((0 . "LINE")(8 . "0")(10 -4.25 0.0 0.0)(11
    0.0 -3.0 0.0)))
    (entmake '((0 . "LINE")(8 . "0")(10 3.0 0.0 0.0)(11 0.0
    4.25 0.0)))
    (entmake '((0 . "CIRCLE")(8 . "0")(10 0.0 0.0 0.0)(40 .
    3.0)))
    (setq en2 (entlast))
    (entmake '((0 . "HATCH")(8 . "0")(10 0.0 0.0 0.0)(2 .
    "_USER")(70 . 0)(71 . 1)(91 . 1)(92 . 7)(72 . 1)(73 . 1)(93 . 3)(10
    2.35514e-016 3.0 0.0)(42 . 0.414214)(10 -3.0 0.0 0.0)(42 .
    0.414214)(10 -2.35514e-016 -3.0
    0.0)(42 . 0.0)(97 . 2)(cons 330 en1)(cons 330 en2)(75 . 0)(76 . 0)(52 .
    0.0)(41 . 0.375)(77 . 0)(78 . 1)(53 . 0.0)(43 . 0.0)(44 . 0.0)(45 . 0.0)(46
    .. 0.375)(79 . 0)(47 . 0.025875)(98 . 1)(10 -0.648205 0.884371 0.0)))
    (entmake '((0 . "ENDBLK")))
    )
    )

    Thanks

    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
     
    Jamie Duncan, Jan 20, 2004
    #1
  2. Jamie Duncan

    Devin Guest

    I think you would be better off using active x...

    vla-AddHatch ( object, PatternType, PatternName, Associativity [,
    HatchObjectType])

    There's is documentation for how to add to the outerloop (boundary) in the
    docs. Look in the activex section under the hatch object. But if you still
    want to entmake it then by all means ;)

    Devin
     
    Devin, Jan 20, 2004
    #2
  3. Jamie Duncan

    Jamie Duncan Guest

    knowing nothing about active x, I would prefer to stick to lisp, which I am
    more familiar with

    --


    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
     
    Jamie Duncan, Jan 20, 2004
    #3
  4. Jamie Duncan

    Devin Guest

    I understand.
     
    Devin, Jan 20, 2004
    #4
  5. Jamie Duncan

    Jamie Duncan Guest

    thanks for the help though, and maybe it's time I learned more about it

    --


    Jamie Duncan

    Consulting - If you're not part of the solution, there's good money in
    prolonging the problem.
     
    Jamie Duncan, Jan 20, 2004
    #5
  6. Jamie Duncan

    Devin Guest

    It wasn't too long ago that I only knew lisp. And it was a bit more
    programming. Then I picked up on the activex, it's a little scary at first,
    but it's real easy to pick up. Now the code is greatly reduced in length,
    and I think it's faster too from what I heard. It allows me to do things
    that I never could with lisp alone. The guys here have been a big help to
    me. Ask a few questions and read the docs and pretty soon, you got it down.

    Devin
     
    Devin, Jan 20, 2004
    #6
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.