Osnap

Discussion in 'AutoCAD' started by jo_ar, Sep 7, 2006.

  1. jo_ar

    jo_ar Guest

    Hello All!!

    I'm doing "as built" revision in a great number of electrical drawings
    and Quadrant osnap isn't working...is the only who doesn't work.
    I load other drawing who I did and all oject osnap worked fine,
    then I guess in drawings I'm working, some system variable was
    set wrong...
    Will you please give me some hint were look for.
    Thanks in advance.

    Jo_ar
     
    jo_ar, Sep 7, 2006
    #1
  2. jo_ar

    Carl00711 Guest

    What is the Quadrant Osnap not working on, Circles, Elipses? Are you
    using it as a running snap or as a specific snap on an object?
     
    Carl00711, Sep 8, 2006
    #2
  3. jo_ar

    jo_ar Guest

    In my drawings only have circles...
    Normaly I use snap, but I've tried the Quadrant osnap turning snap off
    and continue not working.

    Jo_ar
     
    jo_ar, Sep 8, 2006
    #3
  4. Patrick Hughes, Sep 8, 2006
    #4
  5. I just tried that an I got a QUAD.

    When you say "extrusion...-1" do you mean that it has thickness of that
    value?
     
    Michael Bulatovich, Sep 8, 2006
    #5
  6. No, what I am referring to is when a circle is drawn in let's say the world
    coordinate system it will have an extrusion direction of "0,0,0" and when
    you perform a "list" command on that circle the extrusion direction will not
    display. Now if you rotate the ucs around the X or Yaxis 180 degrees when
    you do a "list" command you will get a returned value of "0,0,-1" extrusion
    direction.

    I'm still on r14 so maybe a more recent version behaves differently.

    --
    Patrick Hughes

    Engineered Design Solutions
    http://www.engds.com

    Chronos: Time Logging for AutoCAD
    visit http://www.engds.com/Products/Chronos/Chronos.html
     
    Patrick Hughes, Sep 8, 2006
    #6
  7. Oh. I got it. You're right. That kills the QUAD snap. Strange.
     
    Michael Bulatovich, Sep 8, 2006
    #7

  8. You mean an extrusion direction of "0,0,1", right? ;-)


    Juergen
     
    Jürgen Palme, Sep 9, 2006
    #8
  9. jo_ar

    jo_ar Guest

    Hello Patrick!!!

    You were right in part, but I didn't give all information, circle who
    can't osnap
    is included in a block...I did the list with it and is scaled
    1,1,0.1...
    Now my problem is how to solve this problem...I redefine the block, but
    not
    solved.

    Jo_ar
     
    jo_ar, Sep 9, 2006
    #9
  10. Rather than redefining the block, if the 0.1 z scale is irrelevent do a
    ddmodify on it and rescale the z value to the same x and y scale.
    But I assume you have many blocks in your drawing.

    --
    Patrick Hughes

    Engineered Design Solutions
    http://www.engds.com

    Chronos: Time Logging for AutoCAD
    visit http://www.engds.com/Products/Chronos/Chronos.html
     
    Patrick Hughes, Sep 9, 2006
    #10
  11. Patrick Hughes, Sep 9, 2006
    #11
  12. jo_ar

    jo_ar Guest

    You are right Patrick, there are many of those blocks in each page, who
    were scaled in these mad way when inserted...then I guess I'll continue
    working without quad osnap...
    Thanks for your help.

    Jo_ar
     
    jo_ar, Sep 9, 2006
    #12
  13. jo_ar

    rriggs Guest

    You can mirror the block, that would set your extrusiom back to normal.

    I think rotating your UCS about the 'Y' axis 180º, even if its only
    temporary, should allow you to get at your quadrants, and once you're
    done put it back.

    Polylines may cause a big problem using this method though.
     
    rriggs, Sep 12, 2006
    #13
  14. jo_ar

    rriggs Guest

    If your not worried about the rest of the block data try this
    if you are - run it again after you're done.

    (defun c:flipblock ( / myss counter a b c)
    (vl-load-com)
    (setq myss (ssget "X" '((0 . "INSERT") (2 . "your block name here"))))
    (setq counter 0)
    (while (< counter (sslength myss))
    (setq a (vlax-ename->vla-object (ssname myss counter)))
    (setq b (vlax-variant-value (vla-get-insertionpoint a)))
    (setq c (vlax-safearray->list b))
    (command "mirror" (ssname myss counter) "" c "@1<90" "y")
    (setq counter (1+ counter))
    )
    )
     
    rriggs, Sep 12, 2006
    #14
  15. jo_ar

    joar Guest

    Hello Rick!!!
    Thanks for your answer and your routine, but my problem is different,
    circles are included in a block who was inserted scaled x=1, y=1, z=0..1
    I don't know how to change the z scale automaticly, because there are
    too much of those blocks in each page of drawing.

    Jo_ar
     
    joar, Sep 12, 2006
    #15
  16. That's a different question and one that you haven't asked, "How can I
    change the Z-scale factor of a large number of blocks, while leaving the X-
    and Y-scale at 1, so that I can snap to quadrants of circles in the blocks?"
    That's a fairly short piece of lisp

    Save this as a lisp, load it, and type "z1" at the command prompt:

    (defun c:z1 (/ item counter ent item ss sslen)
    (prompt "Z1.LSP will change block Z-scales to 0.")
    (setq ss (ssget))
    (SETQ SSLEN (SSLENGTH SS))
    (setq counter (1- (sslength ss)))
    (while (>= counter 0)
    (setq item (ssname ss counter))
    (setq ent (entget item))
    (if (assoc 43 ent)
    (progn
    (setq ent (subst (cons 43 1) (assoc 43 ent) ent))
    (entmod ent)
    (setq counter (1- counter))
    )
    (setq counter (1- counter))
    )
    )
    (princ)
    );end of routine

    Beware that if there is any z coordinate information that in these blocks
    that *requires* the z scale to be 0.1 (other than insertion point) that this
    information will be changed by this routine....
    --


    MichaelB
    www.michaelbulatovich.ca

    Hello Rick!!!
    Thanks for your answer and your routine, but my problem is different,
    circles are included in a block who was inserted scaled x=1, y=1, z=0.1
    I don't know how to change the z scale automaticly, because there are
    too much of those blocks in each page of drawing.

    Jo_ar
     
    Michael Bulatovich, Sep 12, 2006
    #16
  17. jo_ar

    rriggs Guest

    You are right Patrick, there are many of those blocks in each page, who
    I've just thought of the reason why a block would be scaled in such a
    way.
    I've done this with steel sections, and maybe your blocks are
    representing round steel bars (I don't know)? You can make use of the
    scale foctor programatically by multiplying the weight of the section
    times the length (z-scale-factor).

    Let's say we have a 2" sized round bar which has an area of 3.1416 sq.
    in.
    now lets say that the pounds per foot of that section is
    10.690 lbs./12 in. = .890833 lbs. per in.

    Now that we have a scale factor of the 'z' we can use it as a
    multiplier.
    0.1 * .890833 = .0890833 lbs. and you now have a weight of your part.

    Now you have to think of how a prediction of shipping costs is figured.

    by weight (usually) right?

    Now if each of these blocks have a z factor set to the actual size of
    the part, then a program can be written to easily figure the cost of
    each item, or the total weight of shipment for an assembled product,
    etc...

    If you find that this was the reason for creating such a block, and it
    is being done in house, you may want to encourage those who are
    creeating such things to use invisible attributes to accomplish the
    same purpose. It may be a cylinder(3D) though, this may not be very
    apparent if the scale factor is set as low as 0.1 units.
     
    rriggs, Sep 12, 2006
    #17
  18. jo_ar

    jo_ar Guest

    Thanks a lot Michael...I only changed the step who get entities
    to get only blocks involved, including part of Rick's routine:
    (setq ss (ssget "X" '((0 . "INSERT") (2 . "your block name here"))))
    and worked fine...
    Thanks again.

    Jo_ar
     
    jo_ar, Sep 12, 2006
    #18
  19. Even better. So the snaps work?
     
    Michael Bulatovich, Sep 13, 2006
    #19
  20. jo_ar

    jo_ar Guest

    Yes, Quad osnap back to work fine...
    Thanks Michael and all persons who help me.

    Jo_ar
     
    jo_ar, Sep 13, 2006
    #20
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.