Families-Enable Cutting In Views

Is it possible to set the Enable Cutting in Views parameter using Dynamo? I’ve been poking around for a while now and can’t even find the parameter, let alone figure out how to set it. Almost every node I’ve tried has resulted in a Null or nothing. The parameter does show up in RevitAPIDocs under BuiltInParameter Enumeration as “FAMILY_ENABLE_CUTTING_IN_VIEWS”, so I assume it is accessible somehow, but I’m stumped.

Graph of the myriad of ways I’ve tried to get to the parameter and not had any luck:

edit: the errors on the nodes are: Dereferencing a non-pointer (FamilyDocument.Parameters), Asked to convert non-convertible types (FamilyType.Current), and No Parameter Found (Definition.ByName)

I have also tried using a journal file and had mixed results, in particular with plumbing families; post I made on RFO here: Enable Cutting in Views- Batch Processing? - Revit Forum

Cheers :beers:

going out on a limb here, but I would have to say that this might be a read only system variable, and there is no way that it is accessible. This is one of those hard coded items, where some families are not cutable.

Perhaps others might have more insight . . .

The actual categories cannot be edited to be cut-able if they are not as described here: About Cuttable Families.

The “cut in plan/rcp” can be set via the API as per this property: IsShownInPlanRCPCut Property

Note you’ll need to construct a few “helper” elements to get there, but if that’s what you’re after give this a shot and the community can try to help out.

1 Like

Plumbing is cut-able in 2023, so that shouldn’t be a problem.

Could you clarify what you mean by ‘helper’ elements?

The method above is a member of the FamilyElementVisibility class, which means you’ll need to construct an object of that type. This constructor should do the trick for that. FamilyElementVisibility Constructor

However you’ll notice the input there is a FamilyElementVisibilityType object, which happens to have an enumerator you can call here: FamilyElementVisibilityType Enumeration.

All of that said, you’ll still need to apply said property to the Family file itself (and either save said file or load it into your project, to say nothing of accessing the file). It’s not insurmountable, but it’ll take some work to unearth everything you need.

I presume that creating the constructors involves C#/Python? If so this is getting put on a back burner for the time being, as I know next to nothing about either. I have wanted to figure out Python though- so this might help me kick-start learning it. Always easier to learn with a project.

Thanks for the assist :beers:

Totally doable in either Python environment. In fact I believe the final code would readily update to CPython without issue.