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

Column style fixed on push of vertical columns + setting enum parameters re-enabled #1257

Merged
merged 2 commits into from
Sep 15, 2022
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
3 changes: 3 additions & 0 deletions Revit_Core_Engine/Convert/Physical/ToRevit/FamilyInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ public static FamilyInstance ToRevitFamilyInstance(this Column framingElement, D
familyInstance.get_Parameter((BuiltInParameter.FAMILY_BASE_LEVEL_OFFSET_PARAM)).Set(-1e+3);
familyInstance.get_Parameter((BuiltInParameter.FAMILY_TOP_LEVEL_OFFSET_PARAM)).Set(1e+3);

if (locationLine.IsVertical())
familyInstance.SetParameter(BuiltInParameter.SLANTED_COLUMN_TYPE_PARAM, 0);

familyInstance.CopyParameters(framingElement, settings);
familyInstance.SetLocation(framingElement, settings);

Expand Down
2 changes: 1 addition & 1 deletion Revit_Core_Engine/Modify/SetParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public static bool SetParameter(this Parameter parameter, object value, Document
return parameter.Set(boolValue ? 1 : 0);
}

if (parameter.HasValue && parameter.Definition.GetDataType() == null)
if (parameter.HasValue && parameter.Definition.ParameterType() == null)
{
string val = parameter.AsValueString();
if (val == valueString)
Expand Down
6 changes: 5 additions & 1 deletion Revit_Core_Engine/Query/ParameterType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ public static partial class Query
#else
public static ForgeTypeId ParameterType(this Definition definition)
{
return definition.GetDataType();
ForgeTypeId result = definition?.GetDataType();
if (string.IsNullOrWhiteSpace(result?.TypeId))
result = null;

return null;
}

/***************************************************/
Expand Down