How to create a Detail Group in specific View?

Hi there,

i want to set element in view, therefore i want 3rd option of ‘view’ along with element & location.

Is it possible with dynamo ?

Do you mean to place a detail element, an element which belongs only to the view?
Here a couple of options to place them:

Thanks for help
I tried both options but both are not working.

Can you post a screenshot? With all previews visible

see below

It seems that the method works only with FamilyType, not GroupType. So far I haven’t found anything in the API.
Maybe someone knows a solution?

Would it be an option to create a new detail family, instead of grouping multiple families?

Hey Robert,

From your second image I understand that you are trying to place a Group, that contains view specific items (Detail Items, Filled Regions, Detail Lines etc.), hence making that Group view specific. Groups are kind of its own animal. There is an API method for placing Groups (https://apidocs.co/apps/revit/2017/586d4f2e-0985-2d0b-dbb7-ea6d2f704336.htm), but it only accepts two inputs - location, and type. I tested it on Detail Groups, and it seems that Revit doesn’t fail on creating Detail Groups for a 3D View for example. I know that’s a little strange. Also, since there is no specific View input for PlaceGroup() method, it seems that its using currently ActiveView to place them. Just keep in mind that even though, it places the group, and new Id is created, 2D elements will not be visible in 3D Views. Here’s a dead simple sample file:

image

Python code:

# Copyright(c) 2018, Konrad K Sobon
# @arch_laboratory, http://archi-lab.net

import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *

import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)

TransactionManager.Instance.EnsureInTransaction(doc)

try:
    errorReport = None

    t = UnwrapElement(IN[0])
    l = XYZ(0,0,0)
    groups = doc.Create.PlaceGroup(l, t)
except:
    import traceback
    errorReport = traceback.format_exc()

TransactionManager.Instance.TransactionTaskDone()

if None == errorReport:
    OUT = groups
else:
    OUT = errorReport

Also note that I am running this in MANUAL mode:

image

Manual mode is important since I am using the AllElementsOfType node. It will cause an infinite loop and crash Revit if you use it with Automatic mode.

Hope this helps.

Basically, I think to automate your routine for placing Detail Groups in multiple views, you would have to come up with a routine that opens/activates a view, you want that group to be placed, and then places it. That’s a different question though in my opinion so start a new post.

3 Likes

Is it possible to do a copy and paste to a specific view? The process would be like:

  • Place detail group to active view using your PlaceGroup() method.
  • Copy newly created instance.
  • Paste to specific view/point.
  • Delete original instance.

Would this be possible?

Thanks Konrad,

So I just came onto a project where they had made 250 detail groups (don’t ask)… No one really knew what each one was or what it was for…

So a quick graph later we have them all laid out on a drafting view, with their name as a text label and a grid to keep track of everything.

I just picked a regular setout of 5m, obvs they vary in size enormously, but it’s still reasonably clear.

Some of them did freak out so I had to ungroup them on the view, but they have their label so people know what they were.

Thanks for the post!

Mark

Apologies for the scrappy graph, I was working at speed!

Dear @Mark.Ackerley,

I would like to get more information about your script.
I would like to place the detail group to a specific view and a specific location.

Could you send me the python script of “Place Group” with the IN[0] and IN[1] input?
Furthermore I would like to know if there is a possibility to place multiple detail groups at the same time to multiple views and multiple times place the same group?

Thanks in Advance!

Greets,
Rick Landkroon