Author Topic: VISRETAIN - System Variable  (Read 5917 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
VISRETAIN - System Variable
« on: December 18, 2015, 02:58:45 PM »
Code: [Select]
Controls the properties of xref-dependent layers.

Type: Integer
Saved in: Drawing
Initial value: 1
Controls visibility, color, linetype, lineweight, and plot styles.
TheSwamp.org  (serving the CAD community since 2003)

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: VISRETAIN - System Variable
« Reply #1 on: December 18, 2015, 03:12:39 PM »
I vote 1.

In my opinion xref geometry & content should be displayed appropriately in each drawing in which it is referenced; the appearance of xref layers for one drawing may not necessarily be appropriate for another (for example, xref layer colours may need to be 'dimmed' in a drawing for which the xref geometry should be displayed, but not take precendence over other more important information). Hence VISRETAIN=1 allows refinement on a per-drawing basis.

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Re: VISRETAIN - System Variable
« Reply #2 on: December 18, 2015, 03:53:20 PM »
1+

Out of topic, I always wanted to plot Xrefs within other model space geometry, but like xref attached fade representation... Is this possible - or I must still modify layers transparencies manually?
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ronjonp

  • Needs a day job
  • Posts: 7529
Re: VISRETAIN - System Variable
« Reply #3 on: December 18, 2015, 03:59:41 PM »
I prefer 0 unless I need to control layers in viewports. I like that what I see in my design file, I'll see in plot files. Although this could be changed if I plotted out of my design file .... anyhoo. :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

lamarn

  • Swamp Rat
  • Posts: 636
Re: VISRETAIN - System Variable
« Reply #4 on: December 18, 2015, 05:22:39 PM »
Mostly 1 for 2d drawings. 0 in a  the structure of xref-3d models. I could see the use a seperate visretain for just alone the transparency of layers 0/1 for 3d. I use Giles, fix block routine often to get blockdata into 'layer shape'..
« Last Edit: December 18, 2015, 05:27:31 PM by lamarn »
Design is something you should do with both hands. My 2d hand , my 3d hand ..

BlackBox

  • King Gator
  • Posts: 3770
Re: VISRETAIN - System Variable
« Reply #5 on: December 21, 2015, 02:33:17 AM »
I prefer 0 unless I need to control layers in viewports.

This.

I have yet to find a simpler way to manage a plan set, where VISRETAIN == 0 is used for the majority of sheets that make up our Civil plans (paving, grading, and drainage), and VISRETAIN == 1 is used for the remaining sheets (as required; not needed for detail only sheets, etc.).


Cheers
"How we think determines what we do, and what we do determines what we get."

HasanCAD

  • Swamp Rat
  • Posts: 1422
Re: VISRETAIN - System Variable
« Reply #6 on: December 21, 2015, 02:55:20 AM »
It is important for Arch. & struc. drawings to be 1. But for other departments it should be 0.
all other departments need to show they work and all other to be fade.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: VISRETAIN - System Variable
« Reply #7 on: December 21, 2015, 07:06:54 AM »
I vote 1, but it would still be nice IF there was a way to set the visretain to 0 just to reload "Linetypes" and hold the current colors of the xref's. They only way I found around it is with layer filters and scripts.
Civil3D 2020

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: VISRETAIN - System Variable
« Reply #8 on: December 21, 2015, 07:13:10 AM »

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: VISRETAIN - System Variable
« Reply #9 on: December 21, 2015, 07:21:03 AM »
AHHHHH.... I should have know!! lol. Well, all I got to say is "1".:)
Civil3D 2020

lamarn

  • Swamp Rat
  • Posts: 636
Re: VISRETAIN - System Variable
« Reply #10 on: December 21, 2015, 09:00:21 AM »
Would it be possible to add 'transparency of layer' in your code as option, Lee?
Design is something you should do with both hands. My 2d hand , my 3d hand ..

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: VISRETAIN - System Variable
« Reply #11 on: December 21, 2015, 09:34:18 AM »
Would it be possible to add 'transparency of layer' in your code as option, Lee?

If I recall, the original code was written to be entirely compatible with ObjectDBX, and unfortunately there is no way to configure the transparency of a layer without going through the LAYER command which would remove this compatibility.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: VISRETAIN - System Variable
« Reply #12 on: December 21, 2015, 09:56:28 AM »
... there is no way to configure the transparency of a layer without going through the LAYER command which would remove this compatibility.
In BricsCAD changing the transparency of a layer is a case of simply changing its Xdata. Assuming BricsCAD is compatible with 'the other product', and I am counting on this, this should therefore also be possible in a DBX context.
Code - Auto/Visual Lisp: [Select]
  1. (_Data_ObjectXdataSet
  2.   lyrObj
  3.   "AcCmTransparency"
  4.   (if (/= val 33554687) (list (cons 1071 val))) ; Remove Xdata if transparency is 0%.
  5. )

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: VISRETAIN - System Variable
« Reply #13 on: December 21, 2015, 10:17:07 AM »
... there is no way to configure the transparency of a layer without going through the LAYER command which would remove this compatibility.
In BricsCAD changing the transparency of a layer is a case of simply changing its Xdata. Assuming BricsCAD is compatible with 'the other product', and I am counting on this, this should therefore also be possible in a DBX context.
Code - Auto/Visual Lisp: [Select]
  1. (_Data_ObjectXdataSet
  2.   lyrObj
  3.   "AcCmTransparency"
  4.   (if (/= val 33554687) (list (cons 1071 val))) ; Remove Xdata if transparency is 0%.
  5. )

In my limited testing this does not appear to be the case in AutoCAD: the xdata associated with a layer will of course yield the correct transparency value, but appending/modifying such xdata seems to have no effect on the transparency of the layer.

BlackBox

  • King Gator
  • Posts: 3770
Re: VISRETAIN - System Variable
« Reply #14 on: December 21, 2015, 10:53:50 AM »
The only real issue with 1 that I have, is the dependency on Layer States, which even with the Layerstate-* LispFunctions does not properly reload from .LAS file (one for each sheet type in a given plan set).

That, and Civil 3D Objects can have undesired results (example: Station Offset labels for an alignment?), when layers are frozen vs being turned off, etc which is just a PITA.
« Last Edit: December 21, 2015, 12:39:15 PM by BlackBox »
"How we think determines what we do, and what we do determines what we get."

BlackBox

  • King Gator
  • Posts: 3770
Re: VISRETAIN - System Variable
« Reply #15 on: December 21, 2015, 12:43:10 PM »
To that end, it would be fantastic if Layer States operated more like Sheet Set Properties, where each sheet could be assigned a Layer State, and modifying the Layer State once propagated the other associated sheets - just save Layer State settings, or change the assigned Layer State, and print.
"How we think determines what we do, and what we do determines what we get."

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: VISRETAIN - System Variable
« Reply #16 on: December 21, 2015, 01:00:10 PM »
... there is no way to configure the transparency of a layer without going through the LAYER command which would remove this compatibility.
In BricsCAD changing the transparency of a layer is a case of simply changing its Xdata. Assuming BricsCAD is compatible with 'the other product', and I am counting on this, this should therefore also be possible in a DBX context.
Code - Auto/Visual Lisp: [Select]
  1. (_Data_ObjectXdataSet
  2.   lyrObj
  3.   "AcCmTransparency"
  4.   (if (/= val 33554687) (list (cons 1071 val))) ; Remove Xdata if transparency is 0%.
  5. )

In my limited testing this does not appear to be the case in AutoCAD: the xdata associated with a layer will of course yield the correct transparency value, but appending/modifying such xdata seems to have no effect on the transparency of the layer.
More testing shows that the situation is not as simple as I have suggested in BricsCAD either.
You can change the transparency of  a layer by changing the Xdata. But if there are entities on that layer or if the original transparency was not equal to zero, you have to close and reopen the file to see any effect. Even _EXPLAYERS (BC's layer manager) will show the old value until you do. :-(

lamarn

  • Swamp Rat
  • Posts: 636
Re: VISRETAIN - System Variable
« Reply #17 on: December 21, 2015, 04:03:16 PM »
Thank you Lee, en Roy.
I dont fully understand but get a sort of a picture. :?
Design is something you should do with both hands. My 2d hand , my 3d hand ..

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: VISRETAIN - System Variable
« Reply #18 on: December 22, 2015, 07:21:46 AM »
... there is no way to configure the transparency of a layer without going through the LAYER command which would remove this compatibility.
In BricsCAD changing the transparency of a layer is a case of simply changing its Xdata. Assuming BricsCAD is compatible with 'the other product', and I am counting on this, this should therefore also be possible in a DBX context.
Code - Auto/Visual Lisp: [Select]
  1. (_Data_ObjectXdataSet
  2.   lyrObj
  3.   "AcCmTransparency"
  4.   (if (/= val 33554687) (list (cons 1071 val))) ; Remove Xdata if transparency is 0%.
  5. )

In my limited testing this does not appear to be the case in AutoCAD: the xdata associated with a layer will of course yield the correct transparency value, but appending/modifying such xdata seems to have no effect on the transparency of the layer.
More testing shows that the situation is not as simple as I have suggested in BricsCAD either.
You can change the transparency of  a layer by changing the Xdata. But if there are entities on that layer or if the original transparency was not equal to zero, you have to close and reopen the file to see any effect. Even _EXPLAYERS (BC's layer manager) will show the old value until you do. :-(

In AutoCAD, changing the value of the layer entity xdata will cause the new transparency value to be shown in the Layer Manager, but no change will be seen in the drawing until the drawing is closed and reopened.

(Aside, perhaps this discussion should be moved to a separate thread - sorry for the derailment!)

tedg

  • Swamp Rat
  • Posts: 811
Re: VISRETAIN - System Variable
« Reply #19 on: December 28, 2015, 08:12:48 AM »
It is important for Arch. & struc. drawings to be 1.
+1 all day long... especially when sharing other discipline's drawings for backgrounds.
Written right in my Acaddoc.lsp (setvar "visretain" 1)
Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023