also flatten inside the blocks?

Discussion in 'AutoCAD' started by Laura, Jun 9, 2004.

  1. Laura

    Laura Guest

    The lisp "Flatten" does flatten the insertion points of the blocks and all
    other elements, but doesn't flatten the lines IN the Block. I've tried to
    find a version which does it but haven't found it. Is there a lips that also
    flattens the inner elements of blocks and attributes?
    Is the only way to explode the blocks first? I hope not....

    Hope some can help,

    Laura
     
    Laura, Jun 9, 2004
    #1
  2. Laura

    Joe Burke Guest

    Laura,

    Maybe run flatten while using refedit?

    Joe Burke
     
    Joe Burke, Jun 9, 2004
    #2
  3. Laura

    OLD-CADaver Guest

    Select the blocks, then control+1 for properties and change the Z Scale factor to 1e-99
     
    OLD-CADaver, Jun 9, 2004
    #3
  4. Laura

    Laura Guest

    hi Joe,

    Flatten works in blocks. That is not the problem. But I have to do it with a
    lot of different blocks before I have changed the whole drawing. And the
    Attributes in with the block are a bigger problem then, because you can't
    change them at all. When you use -ATTEDIT to change the position of the
    attribute you have to fill in a 2D point.

    laura
     
    Laura, Jun 9, 2004
    #4
  5. Laura

    Laura Guest

    That is not realy the problem. Flatten changes the z-coordinate of the
    insertionpoint of the block to zero, but not the elements/lines INSIDE the
    block. And also the attributes stay at a Z-level. Ofcourse I can use the
    flatten while using refedit, but i have to do a whole lot of blocks that way
    in one drawing. And the attribute stays on a Z-level

    Laura

    factor to 1e-99
     
    Laura, Jun 9, 2004
    #5
  6. Laura

    Laura Guest

    That is not realy the problem. Flatten changes the z-coordinate of the
    insertionpoint of the block to zero, but not the elements/lines INSIDE the
    block. And also the attributes stay at a Z-level. Ofcourse I can use the
    flatten while using refedit, but i have to do a whole lot of blocks that way
    in one drawing. And the attribute stays on a Z-level

    Laura


    factor to 1e-99
     
    Laura, Jun 9, 2004
    #6
  7. Laura

    Joe Burke Guest

    Laura,

    I think this is right, but I only tested it once. Try it on a copy of your drawing.

    Joe Burke

    (defun c:FlattenLaura ( / blocks stpt enpt inspt )
    (setq blocks
    (vla-get-blocks
    (vla-get-activedocument
    (vlax-get-acad-object))))
    (vlax-for blk blocks
    (vlax-for item blk
    (if (= "AcDbLine" (vlax-get item 'ObjectName))
    (progn
    (setq stpt (vlax-get item 'StartPoint))
    (setq stpt (subst 0.0 (caddr stpt) stpt))
    (vlax-put item 'StartPoint stpt)
    (setq enpt (vlax-get item 'EndPoint))
    (setq enpt (subst 0.0 (caddr enpt) enpt))
    (vlax-put item 'EndPoint enpt)
    )
    )
    (if (= "AcDbAttributeDefinition" (vlax-get item 'ObjectName))
    (progn
    (setq inspt (vlax-get item 'InsertionPoint))
    (setq inspt (subst 0.0 (caddr inspt) inspt))
    (vlax-put item 'InsertionPoint inspt)
    )
    )
    )
    )
    (princ)
    ) ;end
     
    Joe Burke, Jun 9, 2004
    #7
  8. Laura

    OLD-CADaver Guest

    <<That is not realy the problem. Flatten changes the z-coordinate of the insertionpoint of the block to zero>>

    You missed my point, I said change the Z "SCALE" to 1e-99. that makes the z-"SCALE" factor essentially 0, or flat.
     
    OLD-CADaver, Jun 9, 2004
    #8
  9. Laura

    andywatson Guest

    Laura, you did miss his point.
     
    andywatson, Jun 10, 2004
    #9
  10. Laura

    Laura Guest

    I'm very sorry, I didn't do it correctly.
    Even the attributes are going with it. Great!

    Thanks

    Laura
     
    Laura, Jun 10, 2004
    #10
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.