Override in View doesn't override anymore

Hello,

before deployment I wanted to make sure that the script works on our test projects.
My script was working perfectly fine yesterday, nothing changed. (I only copied the script to a different location).
However, when I ran it today, the color override doesn’t do it’s job anymore and I even get an error.
What might have caused this? I’m truly baffled what happened.

output today


output yesterday
clearance2
script

Check filters and view style/display in the new project.

the project didn’t change since yesterday it’s on my local machine.

What are the error messages?

1 Like

DirectShape.ByGeometry,1,“DirectShape.ByGeometry operation failed. The referenced object is not valid, possibly because it has been deleted from the database, or its creation was undone.”,null

Element.OverrideInView,1,“Internal error, please report: Dereferencing a non-pointer. href=DereferencingNonPointer.html”,null

The thing is I only get it when I run the thing in the Player. If I open the script and run it form there, there’s a 50/50 chance it will show what I want.
There aren’t any graphical overrides or view templates used. I’m just baffled what the issue is.

Smells like element binding to me.

Try replacing the direct shape node near the end and see if it works.

Post a .dyn which reproduces the issue so we can have a look.

clearance_zone_V1.dyn (84.1 KB)
clearance_zone_V2.dyn (81.0 KB)

I don’t necessarily want to create and save a new family each time from the solid, the users only need it for a visual check.

Importinstance.ByGeometry seems to work without issue (also in Player), but I’m still suspicious. Does DirectShape have some specific property which interferes somehow with the override?

Hi @EV_92 try as here with synrhezise or try with spring, and try a flatten before union. probably it could work

and something with OOTB

Not element binding as no bindings are saved in the file. From what I can see the 75% transparency is causing the issue, as you’ve already got a transparency on the object style. This is my test in Revit 2024 and the V1 graph:
Clearance Display

Select the element in Revit and look at the manual override, if it’s there then the graph is working. Try to reduce it to 0 and see if it shows up. From my testing a value of 10% makes it effectively invisible.

1 Like

In unrelated news, you may to consider assigning a ‘needs clearance review’ on items which are inside the clearances; much more efficient on the end users and allows you to help transition them to seeing the potential of data driven design.

Also you may want to review what happens at the corners of your offset - not sure I know many building clearances which allow discarding such areas entirely.

1 Like

I re-run the V1 code on the same project and now I get this as output. No transparency, no color.

My next step is, to color them in differently if there’s a collision between them. (But something with my lacing is wrong, it only recognizes the first two colliding instances)

I’m in the EU, this specific clearance zone is defined by the facade area, therefore the corners are not a point of interest in this case :).

Which Revit version are you in? Can you show how the graph runs in a clean file from no template, similar to what I produced? If you select the direct shape and check the overrides, is anything there?

24.1.10.25
20230830_0315(x64)
2024.1.1

This a completely new project without any template, with V1 I get white blocks.

yeah i would say check for ovveride as Jacob mention…does it work if you give a default materiel…

clearance_zone_V1.dyn (90.0 KB)

Set transparency to 0 as in my example and try again, I think you’ll get results that way. The default for the category or object type (direct shape) you’re using displays the object transparent; you’re making it further transparent which is causing it to become 100% very quickly.

nope, if I set the transparency to 0 I still get the same result. weird.

Is consistent colors on?

with consistent color the whole thing is grey, with hidden lines is white.