Results 1 to 5 of 5

Thread: Ordering Xref's through the command line

  1. #1
    Member
    Join Date
    2021-08
    Posts
    23
    Login to Give a bone
    0

    Post Ordering Xref's through the command line

    I have 3 Xrefs in a drawing (test 1) (test 2) & (test 3) I would like to call up each of these and specify the order they are in through the command line without using the cursor.

    Any help would be appreciated.

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Ordering Xref's through the command line

    Are you referring to Draw Order?

    Will the reference names of the XREFs change between drawings?

    Have you tried using the SSGET function with a filter?
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  3. #3
    Member
    Join Date
    2021-08
    Posts
    23
    Login to Give a bone
    0

    Default Re: Ordering Xref's through the command line

    Yes draw order is what I am referring to.

    I would like to run this code from a live lisp that I modify as I move through projects.

    1.If I could call up all the xrefs in the drawing and then specify the order
    2.if I could call up a specific drawing and send to back/bring to front

    I am aware that (ssget "x") selects all within the drawing but I'm unsure how to filter for xref's

    Thanks for the fast response.

  4. #4
    Member
    Join Date
    2021-08
    Posts
    23
    Login to Give a bone
    0

    Default Re: Ordering Xref's through the command line

    1.If I could call up all the xrefs in the drawing and then specify the order
    2.if I could call up a specific xref in a drawing and send to back/bring to front

    sorry for the typo in the response below.

  5. #5
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: Ordering Xref's through the command line

    You need something like Lee-mac's list box routine allows you to move items in a list. http://www.lee-mac.com/listboxfunctions.html is the way to go.

    Getting xref names is not a problem.

    Code:
    (setq lst '())
    (setq blocks (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object))))
    (vlax-for blk blocks
    (if (eq (vla-get-IsXref blk) :vlax-true)
    (setq lst (cons (vla-get-Name blk) lst ))
    )
    )

Similar Threads

  1. How to access Filter command through command line
    By sandeep_koodal in forum AutoCAD General
    Replies: 10
    Last Post: 2009-05-09, 07:19 AM
  2. 2008 SCALE 1:100 xref xref xref xref- scale list issues
    By Apsis0215 in forum AutoCAD Customization
    Replies: 2
    Last Post: 2008-11-21, 08:17 PM
  3. Replies: 15
    Last Post: 2007-04-12, 06:44 AM
  4. ORDERING THE SHEET INDEX
    By jwilhelm in forum Revit Architecture - General
    Replies: 2
    Last Post: 2004-04-29, 07:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •