Here is a last quick Sunday morning post before I head off on vacation, prompted by truevis' comment on the DirectObjLoader GitHub issue #2:
What do we have to change to get this to work in Revit 2017? Seems there are changes in DirectShape.CreateElement
and TessellatedShapeBuilderResult
.
I migrated the sample to Revit 2017 for you.
Here is what I did:
That produced two warnings:
The warning is completely self-explanatory and trivial.
To fix it, just do what the man says.
The error is caused by the changes described in What's New in the Revit 2017 API:
The options for building are now set as options in the TessellatedShapeBuilder
itself. Access these options through the new properties:
Furthermore, the build result is now accessible through GetBuildResult
instead of being returned by the Build
method.
I published a new release 2017.0.0.0 including the corresponding changes.
You can compare the changes to see exactly what I did.
Here is the code for Revit 2017:
The flat migration works fine, and this image was produced as a result from a 6 MB OBJ apartment model: