C# Custom Node should Recognize GH Geometry Types vs Revit Types of same name per "type Hint"

I would think that a C# Custom Node should Recognize GH Geometry Types vs Revit Types of same name per “type Hint”. The only work around is to Cast the GH Line from an OBJECT Type however its seems that would defeat the purpose of using the Type Hint. Is there any other way to do this other than casting a GH Line?
**

**

Because you bring in Autodesk.Revit.DB there will be two classes named Line, and that is causing trouble for the C# compiler.

Instead of doing using Autodesk.Revit.DB; you could do Autodesk.Revit;.

In your code you already do Autodesk.Revit.DB.Line revitLine = ...;, that you can then shorten to DB.Line.

Another way to disambiguate is to use something like using RevitLine = Autodesk.Revit.DB.Line; and use RevitLine revitLine in your code where needed. I prefer this myself, as you can make “new”, explicit type names this way.

2 Likes

This worked thanks. I just removed the using statements because I was already typing out the entire type.
Autodesk.Revit.DB.Line

This brings up a few issues I have overall now that Rhino is Inside “X” Software
which is…
Why is the type in the custom c# node still hard coded?
I understand when it was just GH and RHINO and there were very few types that could be set with a “hint type”
but now there are many more “types” now that Rhino is “Inside” other programs
Revit, Autocad, unity, etc
Are there any plans to address this issue?
See my similar post here

but now I am thinking instead of adding every possible “type” from Revit and other programs, just allow the user to change the type in the parameters section of the method?