Skip to content

Commit

Permalink
Add install instructions to contribution guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
tymokvo committed Jun 26, 2024
1 parent 3c03627 commit 3c8fddc
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ Please avoid:
- Lots of unrelated changes in one commit
- Modifying files that are not directly related to the feature you implement

## Install addin from source

- Clone this repository
- Or, fork and clone your fork if you plan to contribute
- Ensure your development environment meets the
[prerequisites](#prerequisites-for-compiling-revitlookup) from the
contributing guidelines
- Run `dotnet build -c '{configuration}'`
- Where `{configuration}` is a string defined in [`RevitLookup.csproj`][rl-proj] at the XPath `/Project/PropertyGroup/Configurations`
- E.g. `dotnet build -c 'Release R23'`

This will build install the project into your local Revit addins directory for
the indicated year.

[rl-proj]: source/RevitLookup/RevitLookup.csproj

## Rules

- Follow the pattern of what you already see in the code
Expand Down Expand Up @@ -71,7 +87,7 @@ public sealed class DocumentDescriptor : Descriptor, IDescriptorResolver
nameof(Document.PlanTopologies) => ResolvePlanTopologies,
_ => null
};

IVariants ResolvePlanTopologies()
{
return Variants.Single(_document.PlanTopologies);
Expand All @@ -95,14 +111,14 @@ public sealed class PlanViewRangeDescriptor : Descriptor, IDescriptorResolver
nameof(PlanViewRange.GetLevelId) => ResolveGetLevelId,
_ => null
};

IVariants ResolveGetOffset()
{
return new Variants<double>(2)
.Add(viewRange.GetOffset(PlanViewPlane.TopClipPlane), "Top clip plane")
.Add(viewRange.GetOffset(PlanViewPlane.CutPlane), "Cut plane")
}

IVariants ResolveGetLevelId()
{
return new Variants<ElementId>(2)
Expand All @@ -127,7 +143,7 @@ public sealed class UiElementDescriptor : Descriptor, IDescriptorResolver
nameof(UIElement.GetLocalValueEnumerator) => ResolveGetLocalValueEnumerator,
_ => null
};

IVariants ResolveGetLocalValueEnumerator()
{
return Variants.Empty<LocalValueEnumerator>();
Expand All @@ -148,11 +164,11 @@ public sealed class DocumentDescriptor : Descriptor, IDescriptorResolver
nameof(Document.PlanTopologies) when parameters.Length == 0 => ResolvePlanTopologies,
_ => null
};

IVariants ResolvePlanTopologies()
{
if (_document.IsReadOnly) return Variants.Empty<PlanTopologySet>();

return Variants.Single(_document.PlanTopologies);
}
}
Expand Down Expand Up @@ -277,4 +293,4 @@ For example, in the `RevitLookup/Views/Controls/DataGrid/DataGridCellTemplate.xa
</DataTemplate>
```

References to additional files must be registered in `RevitLookup/Views/Resources/RevitLookup.Ui.xaml`.
References to additional files must be registered in `RevitLookup/Views/Resources/RevitLookup.Ui.xaml`.

0 comments on commit 3c8fddc

Please sign in to comment.