Block Extents to polyline

Discussion in 'AutoCAD' started by flstf, Apr 7, 2005.

  1. flstf

    flstf Guest

    Oh Wizards of LISP and VBA,
    Is it possible to create something that would allow a user to select a block and have AutoCAD generate a pline from the resulting perimeter. The bpoly or boundary command are close, but requires many picks and results in multiple plines.

    I appreciate your feedback,
    Eddie
     
    flstf, Apr 7, 2005
    #1
  2. flstf

    Joe Burke Guest

    Eddie,

    I assume you are suggesting a shrink-wrap function which outlines a block reference
    with a pline?

    If so it would be daunting task codewise to take all possible object types into
    account.

    I think, though I'm not sure, ToolPak by Dotsoft has something along these lines.

    http://www.dotsoft.com/

    Joe Burke
     
    Joe Burke, Apr 7, 2005
    #2
  3. everything is possible...;-)

    Copy your block and explode
    Analyze data, explode again if necessary
    Grab your points, sort as necessary
    Draw Pline
    Delete Junk

    as Joe noted, more complex the blocks
    the tricker it gets...but a nice learning
    project.

    gl
     
    Paul Richardson, Apr 8, 2005
    #3
  4. flstf

    Joe Burke Guest

    Paul,

    While I appreciate your optimism, I don't think "everything is possible", or this is
    an example of a nice learning project.

    If you still think so, post outline code regarding how you would do it.

    Regards
    Joe Burke
     
    Joe Burke, Apr 8, 2005
    #4
  5. Not sure what the problem is here, but it is really very easy
    to do. Have the user select the objects that you want to
    shrink wrap, compute the composite bounding box, offset it
    to be slighly larger, draw a closed polyline representing that
    offset bounding box, then use BPOLY with an internal point
    that's between the latter and the original figure, and it will
    produce two loops, and you just discard the outermost one.

    I made this long ago, but I"m not at liberty to share it here,
    unfortunately.
     
    Tony Tanzillo, Apr 8, 2005
    #5
  6. If I understood your question.... you want to have an outline profile base on all the components from a block, is that right?

    For what you mentioned about bpoly/boundary, what are you doing, and how are you getting those multiple plines????

    This is not an easy out of the pocket solution, the only think I see here is to in some way convert all the possible enclosed areas into regions and then use the boolean operations to join all the regions and get the resulting enclosure region.

    LE
     
    Luis Esquivel, Apr 8, 2005
    #6
  7. flstf

    Joe Burke Guest

    Tony,

    Obviously that idea didn't dawn on me. I'll give it a try.

    Thanks
    Joe Burke
     
    Joe Burke, Apr 8, 2005
    #7
  8. I see now.... from what Tony post.... what is what the OP is looking for....

    LE
     
    Luis Esquivel, Apr 8, 2005
    #8
  9. flstf

    flstf Guest

    Hey everyone,
    Thanks for the responses.
    To further describe what we're trying to do...
    It would be like we are trying to quickly show the shape of different machines on the shop floor. The blocks to represent the machines are very extensive and detailed. I was just trying to replace those with a pline that showed the footprint shape or extents of the piece. There are some 150 machines with 35 different varieties in over 600 different shops.
    Hope that helps understand.
    Thanks again,
    Eddie
     
    flstf, Apr 8, 2005
    #9
  10. If the machinery blocks are defined with this in mind, you could have an
    outline on its own layer, and just turn off the other layers in drawings
    where you don't want to see all the detail. (Of course, that requires that
    other things in those drawings not be drawn on those layers.)

    If they were Xref'd into those drawings instead of inserted as blocks,
    they'd update in all drawings at once. Assuming that's not the case, and
    you have existing drawings to "fix," you'd have to do whatever routine
    you're imagining in every affected drawing anyway, so maybe you can do it by
    updating the block definitions ( -INSERT <blockname>= ) instead of applying
    the hoped-for routine. And with or without Xref's, you'd probably need to
    do the turning off of layers in each drawing.

    The "hoped-for routine" seems like a real challenge to me, at least if you
    want to cover all possibilities for block definitions. If the block
    perimeter includes any splines, the boundary approach suggested earlier
    can't make a polyline, but offers to make a region instead, and needs an
    answer to its proposal, which isn't part of the sequence if there aren't any
    splines involved. If there's text involved, it ignores it, which probably
    wouldn't be a problem in your application, but could if someone else wanted
    to apply the approach to a different enough situation.
     
    Kent Cooper, AIA, Apr 8, 2005
    #10
  11. So it is an outline profile...

    Just to make sure... can you post an image about what exactly you want....

    LE
     
    Luis Esquivel, Apr 8, 2005
    #11
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.