Help with Setting Xref Layers in Viewport

Help with Setting Xref Layers in Viewport

Domzinator
Advocate Advocate
188 Views
6 Replies
Message 1 of 7

Help with Setting Xref Layers in Viewport

Domzinator
Advocate
Advocate

Hi All i am trying to do the following:

1. User Selects Viewport.
2. All Xref Layers in the Selected viewport needs to be set to truecolor 128,128,128

i have been trying with using Command "vplayer" but this changes all layers to 128,128,128

Civil 3D Certified Professional
0 Likes
Accepted solutions (2)
189 Views
6 Replies
Replies (6)
Message 2 of 7

pbejse
Mentor
Mentor
Accepted solution
(defun c:Demo (/ vp)
  (if (setq vp (car (entsel "\nSelect Viewport")))
    (command "_Vplayer"	"Color" "TrueColor" "128,128,18"  "*|*" "_Select" vp "")
  )
)
0 Likes
Message 3 of 7

paullimapa
Mentor
Mentor
Accepted solution

The clue to do this properly with AutoCADs builtin Vplayer command is shown in @pbejse portion of the lisp code

(command "_Vplayer"	"Color" "TrueColor" "128,128,18"  "*|*" "_Select" vp "")

 Note the layer name pattern used:

"*|*" 

This tells AutoCAD to only apply the color change to xref layers which are the only ones that contain a vertical bar “|” character in the layer name


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 7

jaimuthu
Advocate
Advocate

How To assign if the xref layer name having "Actual" color is 1

0 Likes
Message 5 of 7

pbejse
Mentor
Mentor
0 Likes
Message 6 of 7

paullimapa
Mentor
Mentor

I assume you’re asking how to remove a vplayer color assignment:

Using VPLAYER
The VPLAYER command includes the hidden keyword option reMoveoverrides. This keyword is not in the list of options, but if you enter M at the initial VPLAYER prompt, you'll get a sub-prompt of options to remove one or all types of layer property overrides. You can choose which layers and viewports from which to remove these overrides.”

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Removing-layer-vie...


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 7 of 7

jaimuthu
Advocate
Advocate

OK THANKS FOR YOUR REPLY 

0 Likes