Hi Speckle team
I’m sure this has been asked before but I could not find the answer.
I’m sending some DirectShapes from GH using the Speckle Objects kit:
Then trying to receive it using the Speckle API:
data = receive(objectId, transport)
#returns Base object from GH
# convert Speckle Base to Revit Geometry
kit = Kits.KitManager.GetDefaultKit()
converter = kit.LoadConverter(Objects.Converter.Revit.ConverterRevit.RevitAppName)
converter.SetContextDocument(doc)
directShape = converter.ConvertToNative(data)
#returns none
All works well, except that after using the ConvertToNative
method I get None
.
As a test, I tried receiving a geometry that I send straight from Revit using the same piece of code, and that actually works, implementing the necessary transactions.
Is there a missing step to convert Base objects received from Grasshopper to a Revit Object? Can you guys please point me to what I might be doing wrong?
A snippet of code, even if in C# would be extremelly helpful.
@AlanRynne
Thanks!