Author Topic: For Wyatt Earp, draworder attributes  (Read 2480 times)

0 Members and 1 Guest are viewing this topic.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
For Wyatt Earp, draworder attributes
« on: April 05, 2006, 05:59:53 PM »
This is a continuation of a PM I received, I felt it best done in the public's view.
"....so I need to know is there an easy to use VLSP to make a selection set of the (0 . "attrib") - All I am looking to do if "grab" them all and then sort a display order when embedded in an XREF. I'm using R2006."
<snipped out the code>

AFAIK......
Attribute references cannot be obtained by a selection set, nor can their Draworder be changed independently of the insert they are attached to. You cannot select objects, of any type, within Xrefs to be used in the Draworder.

I don't know if the problem in R2002 of Xref's Draworder not being recognized has been fixed in 2006, but if it has then adjust the Xref drawing before importing into the parent drawing.

If anyone knows anything that says I'm wrong about these things, I'd be happy to hear it.
« Last Edit: April 06, 2006, 10:13:00 AM by CAB »

Wyatt Earp

  • Guest
Re: For Wyatt Earp
« Reply #1 on: April 05, 2006, 06:14:04 PM »
Well, yes you can get objects to do that in R2006. I'm trying to get a selection set of Attributes of blocks listed in a drawing so that I can bring them above wipeouts.

It is just a matter of draworder which I am trying to automate.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: For Wyatt Earp
« Reply #2 on: April 05, 2006, 06:38:05 PM »
OK, if you can describe how you'd do this via the command line then I could probably figure out the automate part.

I tried the Draworder in 2006 and was unable to select an attribute to bring forward, the entire block insertion gets selected
« Last Edit: April 05, 2006, 06:42:30 PM by Jeff_M »

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: For Wyatt Earp
« Reply #3 on: April 06, 2006, 07:32:36 AM »
You can't modify attributes by draworder command or by vlisp method (sortents table)... :-(
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

Wyatt Earp

  • Guest
Re: For Wyatt Earp, draworder attributes
« Reply #4 on: April 06, 2006, 05:10:03 PM »
Well here's the code I came up with:

Code: [Select]
(defun C:xBack ()

  (setq xb1 (ssget "X"
   (list (cons 0 "insert")
(cons 8 "_xref")
   )
    )
  )
  (setq xb2a (ssget "X"
   (list (cons 0 "insert")
(cons 8 "_sym03")
   )
    )
  )
  (setq xb2c (ssget "X"
   (list (cons 0 "insert")
(cons 8 "_sym05")
   )
    )
  )
  (setq xb3 (ssget "X"
   (list (cons 0 "mtext") )
   )
)
  (setq xb4 (ssget "X"
   (list (cons 0 "dimension")
)
   )
)
  (setq xb5 (ssget "X"
   (list (cons 0 "wipeout")
)
   )
)

  (if xb1
    (progn
      (command "draworder" xb1 "" "b")
      (command "regenall")
      (princ "\nAll Xrefs Have Been Moved Back... ")
    )
  )
  (if xb3
    (progn
      (command "draworder" xb3 "" "f")
      (command "regenall")
      (princ "\nAll Text Objects Have Been Moved Forward... ")
      )
    )
  (if xb4
    (progn
      (command "draworder" xb4 "" "f")
      (command "regenall")
      (princ "\nAll Dimension Objects Have Been Moved Forward... ")
      )
    )
 
  (if xb5
    (progn
;(command "draworder" xb5 "" "a" xb1 "")
        (command "draworder" xb5 "" "u" xb2a "")
        ;(command "draworder" xb5 "" "u" xb2-shape "")
        (command "draworder" xb5 "" "u" xb2c "")
        (command "draworder" xb5 "" "u" xb3 "")
        (command "draworder" xb5 "" "u" xb4 "")
        (command "regenall")
(princ
  "\nAll Wipeout Objects Have Been Moved Accordingly... "
)
      )
    ;)
  )
  (princ)
  (setq xb1 nil
xb2a nil
xb2-shape nil
xb2c nil
xb2 nil
xb3 nil
xb4 nil
xb5 nil
)
)

What I'm trying to do is generate a series of selection sets and then to with a single command move the visual content applicably. Alternately I've also thought about creating groups around everything that we do in the office so that the group can be moved accordingly - trouble is I'm not sure how to automate that mess... Ideas?

Thanks guys



<Code tags Added - CAB>
« Last Edit: April 06, 2006, 05:16:57 PM by CAB »

whdjr

  • Guest
Re: For Wyatt Earp, draworder attributes
« Reply #5 on: April 06, 2006, 05:30:36 PM »
In reference to xrefs my comment doesn't work but in reference to blocks what we do to workaround draworder is to 'CUT' and 'PASTE' the blocks in the desired order.  This gives the desired effect of draworder.  What this does is adds the blocks to database last therefore they are on top.