Resetting insertion point

Discussion in 'AutoCAD' started by Cad_Girl, Jul 1, 2004.

  1. Cad_Girl

    Doug Broad Guest

    Cad_Girl,
    Don't mean to criticize but it doesn't seem like you are
    making much effort to solve your problems. You've been
    given great advice from the get-go and seem to be ignoring
    it. Now you've got a program from no.name which looks to
    be at least an hour's work to do it for you and you seem
    to be ignoring it.

    If it were me (and I'm into programming), I'd use Tom's
    suggestion:

    properties -> Push Filter button -> Choose "External References"
    -> Click OK -> Type 0 for x insert, 0 for y insert, 0 for z insert,
    and 0 for rotation.

    That moves and rotates ALL xrefs in the current drawing.

    BTW: When coming to to forum to ask for help, please
    indicate your version of CAD.



    as they're not to bright on CAD (not ALL Archs, just ours!).
    were not in "real co-ords". But they are now.
    co-ords. This included the xrefs. There are alot of xrefs in each one of our drawings.
    properties but there are lots of xrefs, so I was hoping I could globally change the lot, per drawing. Many xrefs have layers frozen
    after import, and I know that just by moving the xref, the layer state wont change.
     
    Doug Broad, Jul 1, 2004
    #21
  2. Cad_Girl

    Cad_Girl Guest

    fao no.name

    Sorry, can't get that to work!
    Message as follows in command line area:
     
    Cad_Girl, Jul 1, 2004
    #22
  3. Cad_Girl

    no.name Guest

    scary ! sweet. i love putting the scare on.
     
    no.name, Jul 1, 2004
    #23
  4. To do it to all Xref's in a drawing at once, call up the Properties box
    (either before or after the following);
    go into QSELECT;
    under Object Type, select External Reference;
    pick OK.

    Then pick the insertion point and rotation items in the Properties box and
    change them all to zero.

    This even finds Xref's that are not in the current space, so you might want
    to be careful if there are any other Xref's you don't want to change. If
    so, you probably need to be in the type of space where they're xref'd in,
    and select them on-screen. If they're all in the same space, you could zoom
    to the extents, do a crossing window of the whole blasted thing to pick
    everything, and limit the selection to Xref's with the pull-down list at the
    top of the Properties box.

    Pretty easy. But if no.name's monster-routine does them all with one simple
    command typed in or picked from a menu, that would probably be even easier.

    Kent Cooper, AIA


    that trying to find and select each xref (not knowing how many there were in
    each dwg) and changing 4 lots of values.
     
    Kent Cooper, AIA, Jul 1, 2004
    #24
  5. Cad_Girl

    Cad_Girl Guest

    Doug,
    Sorry for any misunderstanding. I AM trying to solve my own problems, but currently have little knowledge with lisp - though it is growing with MUCHO help from people in this forum. This place is such a valuable source of information, and have learnt alot from other peoples posts already in a very short space of time.

    I did not deliberatly ask for source code, though it has been kindly supplied by people here. I have tried and had no luck in getting things to work! How else do I learn without asking?!

    I have written a few very useful routines for myself, but very simple (you could probably rip them apart in minutes!). I have not ignored the help from people here, just don't fully understand yet.

    My apologies to everyone again. Will try harder next time!
    Just trying to do my best!

    Cad_Girl xx
     
    Cad_Girl, Jul 1, 2004
    #25
  6. Cad_Girl

    no.name Guest

    save .lsp file to harddrive, load with 'appload', type ' xr-ins-rot ' at
    command line, should work, try it & see if it works, backup anything
    important dwg wise.
     
    no.name, Jul 1, 2004
    #26
  7. Cad_Girl

    Cad_Girl Guest

    no.name,
    Thanks for the file and the instructions, but still can't get to work!!
    Lisp now loading without error message, type "xr-ins-rot" at command prompt - but nothing happens!!
    Any more advise, pls?
    Really sorry for being a pain in the neck!!

    Cad_Girl xx
     
    Cad_Girl, Jul 1, 2004
    #27
  8. Cad_Girl

    no.name Guest

    my guess is:
    you have to load it in each drawing you open
    so using appload, bottom right hand corner of dialog box under startup
    suite, hit contents, add browse to lsp file, hit close, hit close again & it
    should load into every dwg you open, not the ones already open.
     
    no.name, Jul 1, 2004
    #28
  9. Cad_Girl

    no.name Guest

    xr-ins-rot = at command line without qoutes.
     
    no.name, Jul 1, 2004
    #29
  10. Cad_Girl

    Cad_Girl Guest

    Thanks no.name,
    Finally got it to work. Problem on my side - ooops!
    Thank you, routine is excellent.

    For anyone else, this is what I came up (Doug!):

    ;;;----------
    (defun c:xrefstozero (/ a b xset ent entl)
    (cond
    ((setq xset (ssget "X" '((0 . "INSERT"))))
    (setq a 0 b 0)
    (repeat (sslength xset)
    (setq ent (ssname xset a)
    entl (entget ent)
    a (1+ a)
    )
    (cond
    ((>= (cdr (assoc 70 (tblsearch "BLOCK" (cdr (assoc 2 entl))))) 4)
    (setq entl (subst '(10 0.0 0.0 0.0) (assoc 10 entl) entl)
    entl (subst (cons 50 0.0) (assoc 50 entl) entl)
    )
    (and (entmod entl)(setq b (1+ b)))
    )
    )
    )
    )
    )
    b
    )
    ;;;----------

    Cad_Girl
     
    Cad_Girl, Jul 1, 2004
    #30
  11. Cad_Girl

    Tom Smith Guest

    Don't mean to beat it to death, but you can select any number of things and
    use Properties to change them all at once, it isn't one object at a time.

    Having a routine or button to speed up a repetiive task is a good thing.
    Here, it sounds like the edit needs to be done once in the life of a
    drawing, so unless there are a very large number of drawings, I personally
    wouldn't bother to automate it.

    Open Properties, hit the Qselect button, pick "entire drawing" and "external
    reference," then type in 0,0,0 insertion and 0 rotation, save, and it's
    done. Takes longer to describe than to do. If a couple of hundred drawings
    needed fixing as one large chore, I'd script it, but otherwise I'd just take
    the negligible time to fix each drawing manually whenever I happened to open
    it.
     
    Tom Smith, Jul 1, 2004
    #31
  12. Cad_Girl

    no.name Guest

    you are welcome
     
    no.name, Jul 1, 2004
    #32
  13. Cad_Girl

    OLD-CADaver Guest

    << I AM trying to solve my own problems, but currently have little knowledge with lisp - >>

    And yet you're choosing a lisp solution (a rather convoluted one at that) instead of the easy simple PROPERTIES solution offered here???
     
    OLD-CADaver, Jul 1, 2004
    #33
  14. Cad_Girl

    Cad_Girl Guest

    OLD-CADaver,
    As I said - "though it is growing with MUCHO help from people in this forum. This place is such a valuable source of information, and have learnt alot from other peoples posts already in a very short space of time".

    The "properties solution" is a satisfactory method, I just wish to see if it can be taken any further, thats all.

    I have already learned many things from many of the posted routines in this forum. By seeing how to acheive things in lisp helps me understand other problemsI may face in my own routines too. I am also using a few books, but sometimes they are not as useful as asking questions here. Why else would the forum exist - or is it just for those already in the know, who wish to keep it all in "the club"?

    I really am sorry if anyone has taken offence to this post. It was not my intention to brass people off.
    Sorry to all.

    Cad_Girl
     
    Cad_Girl, Jul 1, 2004
    #34
  15. Cad_Girl

    Doug Broad Guest

    Cad_Girl,

    Great! Looks good. Glad you solved your
    problem. Again- I would have probably used
    properties unless I had hundreds of drawings to
    change.

    Regards,
    Doug
     
    Doug Broad, Jul 1, 2004
    #35
  16. Cad_Girl

    Doug Broad Guest

    Kieren,
    It is extremely rude to post a routine that
    someone else wrote and pass it
    off as one you wrote yourself.

    While browsing on AUGI's website this AM, I
    noticed that Stig Madsen had provided
    you with the code you called your own.

    ALWAYS GIVE CREDIT TO THOSE WHO
    HELP YOU.
     
    Doug Broad, Jul 3, 2004
    #36
  17. Cad_Girl

    cjridder Guest

    who is kieren or stig madsen

     
    cjridder, Dec 9, 2004
    #37
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.