Direct Shape not loading Geometry

Morning All,

I am having an issue using directshape. I had it working fine yesterday morning and I cannot seem to get it to import geometry anymore. You can see by my screen shot it creates it in dynamo it just won’t bring it in to Revit. Any help on this would be greatly appreciated.

Thanks in advance.

DirectShape Issue

Try leaving the material input port unwired (so that it uses the default value).

I suspect you haven’t created a material with a name corresponding to the value of the Number parameter and that is resulting in the error.

I have actual tried just about everything, from only having just the element coming in and I get the same results. As far as the material, I do have them already made.

Hi Clayton,

Hope this helps!

That was a great idea, but I still am getting the same error. I think it is a problem with the node itself.

Clayton, Did you try using custom node “DirectShape.ByGeometry” from spring nodes.

I didn’t, when I do use it, it isn’t giving the error anymore, but it isn’t importing into Revit either.

Can you show your script with the error message.

Try this in Revit:

i) zoom all.

ii) In VG turn off all and only on desired category.

See if it works.

Just tired that and nothing. Below is the error I keep getting. Seems to be repeating for each piece of geometry it is trying to import. Warning: DirectShape.ByGeometry operation failed. The type initializer for ‘Revit.Elements.DirectShape’ threw an exception. DirectShape.ByGeometry operation failed. The type initializer for ‘Revit.Elements.DirectShape’ threw an exception.

what version of Revit are you using?

also, try leaving category empty, I would be worried about writing back out to the same category and also reading from that category.

I am using 2015.

I have tried to write back to MEP Spaces, left blank, and wrote to anything else other than MEP Spaces.

Clayton, I experienced the same problem today, trying to get 3D MEP Spaces and finally managed to find where the problem was. Its coming from the Amount of Names not matching the Amount of 3D solids you want to create, each one of the newly created Direct Shapes needs a different name (different type name). Make sure in the model that you don’t have Spaces with blank names! Put a Watch Node just after Element.GetParameterValueByName and after the Flatten (which is just after Element.Geometry). The two Watch nodes need to have the same amount of Data - 20 Names vs 20 Solids. And instead of the OOTB DirectShape.ByGeometry use the Spirng Nodes one suggested by KULKUL. Hopefully this will help!

Regards

Kaloyan

Hello. I have one question. I create many solids and i use option SolidBySweep.I wont to export this in Revit in some family but, i cant. I used the option SPRINGS.FAMILYINSTANCE.BYGEOMETRY and I created more families and more types. I want all solids to be placed in one family. Can someone help me?

Hi everyone,
I’m just getting started on this workflow and cannot seem to progress beyond this step.
Has anyone encountered this error before?
Any ideas on how to proceed from here?

Thank you in advance!
Best,
Praddy

Hi Praddy
I had to reinstall REVIT to fix it.