Remove parametric dimensions when making a selection

hi,
is it possible not to display the parametric dimensions
does this come from the code?


Python script:

import sys
import clr
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *
from Autodesk.Revit.UI.Selection import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from System.Collections.Generic import *
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
nom_categ = IN[1]

#Thanks to Mr. Chuongmep an Mr. Alban de Chasteigner for the following code
class MySelectionFilter(ISelectionFilter):
	def __init__(self):
		pass
	def AllowElement(self, element):
		if element.Category.Name==nom_categ:
			return True
		else:
			return False

flag = IN[0]

if flag:
	selection_filter = MySelectionFilter()
	elt = uidoc.Selection.PickElementsByRectangle(selection_filter)

select = []

for e in elt:
	select.append(e.Id)
	Icollection = List[ElementId](select)
	uidoc.Selection.SetElementIds(Icollection)

OUT = select

question 11 mars 2024

I thank you in advance
Sincerely
christian.stan

Hi,

No, we cannot turn off temporary dimensions,
possibly you can add a dialog box in your code to show the number of selected objects ?

2 Likes

Thank you very much for the tip to create a dialog box without displaying it (problem solved)

dial = TaskDialog("Résultats")
dial.MainContent=str(len(elt)) + " " + nom_categ
#dial.Show()
OUT = select

cordially
christian.stan

1 Like