Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now Rhino 8 is the default if available. #1041

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/RhinoAPI.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<PropertyGroup Condition="$(Configuration.Contains('R8'))">
<RhinoVersion>8</RhinoVersion>
<RhinoApiVersion>8.0.23304.9001</RhinoApiVersion>
<RhinoApiVersion>8.1.23325.13001</RhinoApiVersion>
<DefineConstants>$(DefineConstants);RHINO_7;RHINO_8</DefineConstants>
</PropertyGroup>

Expand Down
5 changes: 3 additions & 2 deletions src/RhinoInside.Revit.GH/Types/GraphicalElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using ERDB = RhinoInside.Revit.External.DB;
#if RHINO_8
using Grasshopper.Rhinoceros;
using Grasshopper.Rhinoceros.Model;
#endif

namespace RhinoInside.Revit.GH.Types
Expand Down Expand Up @@ -394,9 +395,9 @@ public override bool CastTo<Q>(out Q target)
}

#if RHINO_8
if (typeof(Q).IsAssignableFrom(typeof(ModelContent)))
if (typeof(Q).IsAssignableFrom(typeof(ModelObject)))
{
target = (Q) (object) ToModelContent(new Dictionary<ARDB.ElementId, ModelContent>());
target = (Q) (object) (ToModelContent(new Dictionary<ARDB.ElementId, ModelContent>()) as ModelObject);
return true;
}
#endif
Expand Down
6 changes: 3 additions & 3 deletions src/RhinoInside.Revit.Loader/Loader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ static Distribution PickDistribution()
{
var distributions = new Distribution[]
{
new Distribution(7),
new Distribution(8),
new Distribution(7),
#if DEBUG
new Distribution(7, dev: true),
new Distribution(8, dev: true),
new Distribution(7, dev: true),
#endif
};

Expand All @@ -68,7 +68,7 @@ static Distribution PickDistribution()
TitleAutoPrefix = true,
AllowCancellation = false,
MainInstruction = "Looks like you have many supported Rhino versions installed.",
MainContent = "Please pick which one you want to use.",
MainContent = "Please pick which one you want to use in this Revit session.",
//VerificationText = "Do not show again"
}
)
Expand Down
2 changes: 1 addition & 1 deletion src/RhinoInside.Revit/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ internal static ARUI.Result CheckSetup()
MainIcon = ERUI.TaskDialogIcons.IconError,
AllowCancellation = true,
MainInstruction = "Unsupported Rhino version",
MainContent = $"Expected Rhino version is ({MinimumRhinoVersion}) or above.",
MainContent = $"Expected Rhino version is ({MinimumRhinoVersion.Major}.{MinimumRhinoVersion.Minor}) or above.",
ExpandedContent =
(Distribution.VersionInfo is null ? "Rhino\n" :
$"{Distribution.VersionInfo.ProductName} {Distribution.VersionInfo.ProductMajorPart}\n") +
Expand Down
Loading