Results 1 to 1 of 1

Thread: Button to hide/unhide elements with a specific name?

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2017-11
    Posts
    1
    Login to Give a bone
    0

    Default Button to hide/unhide elements with a specific name?

    Hi all,

    I am trying to make a button in Revit (2017) to hide and unhide elements (Generic Models) with a specific name, using a macro written in VB.net

    Can anyone help me get going? I am a beginner in VB scripting...


    So far I tried to collect all Generic Models in the project using this code:

    Code:
    	Public Sub SelectGMs()
    		Dim Collector As New FilteredElementCollector(Me.ActiveUIDocument.Document)
    		Collector.OfCategory(BuiltInCategory.OST_GenericModel)
    		
    		TaskDialog.Show("Number of GMs", "Number of Generic Models " & Collector.Count.ToString)
    	End Sub
    Because I get too many results, I guess Revit returns more than I want, so I need to filter it down, but I don't know VB enough to do this.
    Last edited by schoeberichts760074; 2017-11-29 at 04:46 PM. Reason: added additional information

Similar Threads

  1. Being able to unhide elements from a hidden category
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2014-10-23, 08:03 PM
  2. 2011: Hide/Unhide issue
    By ezekiel808679546 in forum AutoCAD General
    Replies: 2
    Last Post: 2014-09-08, 12:00 PM
  3. Hiding Specific Elements.
    By andrews-n in forum Revit Architecture - General
    Replies: 4
    Last Post: 2009-12-15, 04:41 PM
  4. Hide in view - How do I unhide an object?
    By johk in forum Revit Structure - General
    Replies: 7
    Last Post: 2008-02-05, 10:45 PM
  5. Unhide feature for Isolate/Hide objects
    By joshua.declercq in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2007-06-18, 01:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •