Jump to content

Data Visualisation Legend


Recommended Posts

9 minutes ago, Hans-Olav said:

You can always delete it, inside the annotation part of the viewport

 

Yes but be good to have option of it not appearing at all. When using data viz in conjunction with Materials instead of class overrides you get a lot of legends turning up that you have no need of ever seeing. Often I'll have a few data visualizations active on the design layer to override the texture on different surfaces, then create a Top/Plan VP + get the legends appearing completely unnecessarily since they relate to something I can't even see in top/plan. There's enough to do going in + out of annotations as it is without the extra job of deleting legends!

  • Like 1
Link to comment
6 minutes ago, Tom W. said:

Often I'll have a few data visualizations active on the design layer to override the texture on different surfaces

 

yes, precisely, same here. It does not make any sense at all to create 20 or more viewports with data-vis-labels, only to go them through one by one, open them , delete the label, close, open next one,delete label, proceed ....

Edited by halfcoupler
  • Like 2
Link to comment
  • 4 months later...
  • 7 months later...

Here is the script to remove legends from all viewports

 

##This script remove data visualization legend from all view ports on all sheet layers
## Created by Jiajing Qi, Tested: VWX2023 SP1, 01/03/2023
## Use it on your own risk

import vs;
global i
i = 0

vs.Message("This script removed data visualization legend from all view ports on all sheet layers.")
# collect handles of selected VPs on active layer
def GetHandle(h):
	if vs.GetObjectVariableInt(vs.GetLayer(h), 154) == 2:
		if vs.GetTypeN(h) == 122:
			hVP.append(h)

hVP = []
vs.ForEachObjectInLayer(GetHandle, 0, 2, 1)

# Traverse into the annotations group of selected VPs and delete Data Visualization Legend
for VP in hVP:
	anno = vs.GetVPGroup(VP, 2)
	h = vs.FInGroup(anno)
	objs = [h]
	h = vs.NextObj(h)
	while h != vs.Handle(0):
		if vs.GetObjectVariableString(h, 1166) == "Data Visualization Legend":
			vs.DelObject(h)
			vs.UpdateVP(h)
			i = i + 1
		h = vs.NextObj(h)
if i > 1:
	vs.AlrtDialog(f"Removed {i} data visualization legends")
else:
	vs.AlrtDialog(f"Removed {i} data visualization legend")

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...