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

Test for ETABS installer #537

Merged
merged 27 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f02bf26
Required Keyword changes (#496)
JR-Morgan Jan 20, 2025
00669ea
fix(civil3d): handles property exceptions for corridor elements (#508)
clairekuang Jan 20, 2025
83efebf
Introduce Event aggregator (#417)
adamhathcock Jan 21, 2025
fd2dd9a
Update DisplayValueExtractor.cs (#509)
clairekuang Jan 21, 2025
c9ca1c0
This is a workaround for Revit's order of operations when initializin…
adamhathcock Jan 22, 2025
9846817
Only allow methods on classes as opposed to anonymous lambdas for Eve…
adamhathcock Jan 22, 2025
e52df07
doument model store fix (#516)
bjoernsteinhagen Jan 22, 2025
7eb1de4
bjorn/cnx-880-add-sections-and-materials-as-proxies (#499)
bjoernsteinhagen Jan 22, 2025
4b5f398
Some clean up for ETABs (#518)
adamhathcock Jan 23, 2025
ca7714a
Use Event Aggregator with Revit (#513)
adamhathcock Jan 24, 2025
da5caa8
bump sdk (#515)
JR-Morgan Jan 24, 2025
d753ea4
Renamed CI workflows for clarity (#519)
JR-Morgan Jan 24, 2025
315a0cb
bjorn/cnx-1105-add-dynamic-setselection-support-no-events-available (…
bjoernsteinhagen Jan 27, 2025
81c3c42
added workflow back into sln (#524)
JR-Morgan Jan 27, 2025
79a6062
Use Event Aggregator with Autocad/Civil (#517)
adamhathcock Jan 28, 2025
67c7ddb
fix(all): aligns all panel, button, and tooltip text across connector…
clairekuang Jan 28, 2025
9e18134
Use Event Aggregator with Navisworks (#523)
adamhathcock Jan 28, 2025
03f0b1f
bjorn/cnx-1111-switching-documents-does-not-invalidate-active-connect…
bjoernsteinhagen Jan 28, 2025
9219cdf
Add PeriodicThreadedEvent to EA and use it (#530)
adamhathcock Jan 29, 2025
4d7225f
bjorn/cnx-1119-remove-caching-from-progress (#534)
bjoernsteinhagen Jan 29, 2025
bb252a5
bjorn/cnx-1112-get-user-facing-names-of-properties (#526)
bjoernsteinhagen Jan 29, 2025
8ca43a1
feat(Navisworks): CNX-1064 - Add hierarchy path property to converted…
jsdbroughton Jan 29, 2025
462d01a
feat(Navisworks): CNX-1043 Enable shared ribbon for v2 and v3 Naviswo…
jsdbroughton Jan 29, 2025
e4a2908
chore(template): amends pr template to be more descriptive (#535)
clairekuang Jan 29, 2025
f4765b9
bjorn/cnx-1133-user-facing-attributes-not-consistent-for-joints (#536)
bjoernsteinhagen Jan 29, 2025
f224935
Add to build (#525)
JR-Morgan Jan 29, 2025
48e66f9
Mesh generator logic to triangulate 2D and 3D surfaces (#529)
kekesidavid Jan 29, 2025
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
65 changes: 28 additions & 37 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
<!---

Provide a short summary in the Title above. Examples of good PR titles:
Provide a short summary in the Title above. Use the following template:

* "Feature: adds metrics to component"
category(project): summary

* "Fix: resolves duplication in comment thread"
Categories:

* "Update: apollo v2.34.0"
* feat: (new feature for the user, not a new feature for build script)
* fix: (bug fix for the user, not a fix to a build script)
* docs: (changes to the documentation)
* style: (formatting, missing semi colons, etc; no production code change)
* refactor: (refactoring production code, eg. renaming a variable)
* test: (adding missing tests, refactoring tests; no production code change)
* chore: (updating grunt tasks etc; no production code change)

Example:

feat(revit): added category filter to send

-->

## Description & motivation
## Description

<!---

Describe your changes, and why you're making them. What benefit will this have to others?
Describe your changes, and why you're making them.

Link related github issues here ->
Fixes #85, Fixes #22, Connects #123

Is this linked to an open Github issue, a thread in Speckle community,
or another pull request? Link it here.
-->

## User Value

If it is related to a Github issue, and resolves it, please link to the issue number, e.g.:
Fixes #85, Fixes #22, Fixes username/repo#123
Connects #123
<!---

Describe in 1 sentence the user value.

This can also be a link to the relevant thread in Speckle community, or a link to the Linear issue.
-->


## Changes:

<!---
Expand Down Expand Up @@ -68,35 +84,10 @@ Describe what tests have been added or amended, and why these demonstrate it wor

<!---

This checklist is mostly useful as a reminder of small things that can easily be

forgotten – it is meant as a helpful tool rather than hoops to jump through.

Put an `x` between the square brackets, e.g. [x], for all the items that apply,

make notes next to any that haven't been addressed, and remove any items that are not relevant to this PR.
This checklist is a useful reminder of related tasks to uphold our repo quality. Amend this list as needed for the pr.

-->

- [ ] My pull request follows the guidelines in the [Contributing guide](https://github.com/specklesystems/speckle-server/blob/main/CONTRIBUTING.md)?
- [ ] My pull request does not duplicate any other open [Pull Requests](../../pulls) for the same update/change?
- [ ] My commits are related to the pull request and do not amend unrelated code or documentation.
- [ ] My code follows a similar style to existing code.
- [ ] I have added appropriate tests.
- [ ] I have updated or added relevant documentation.

## References

<!---

(Optional -- remove this section if not needed )

Include **important** links regarding the implementation of this PR.

This usually includes a RFC or an aggregation of issues and/or individual conversations

that helped put this solution together. This helps ensure we retain and share knowledge

regarding the implementation, and may help others understand motivation and design decisions etc..

-->
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions Build/Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ public static class Consts
new("Connectors/Tekla/Speckle.Connector.Tekla2023", "net48"),
new("Connectors/Tekla/Speckle.Connector.Tekla2024", "net48")
]
),
new(
"etabs",
[
new("Connectors/CSi/Speckle.Connectors.ETABS21", "net48"),
new("Connectors/CSi/Speckle.Connectors.ETABS22", "net8.0-windows"),
]
)
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ public class ArcGISSelectionBinding : ISelectionBinding
public string Name => "selectionBinding";
public IBrowserBridge Parent { get; }

public ArcGISSelectionBinding(IBrowserBridge parent, MapMembersUtils mapMemberUtils)
public ArcGISSelectionBinding(
IBrowserBridge parent,
MapMembersUtils mapMemberUtils,
ITopLevelExceptionHandler topLevelExceptionHandler
)
{
_mapMemberUtils = mapMemberUtils;
Parent = parent;
var topLevelHandler = parent.TopLevelExceptionHandler;

// example: https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Map-Authoring/QueryBuilderControl/DefinitionQueryDockPaneViewModel.cs
// MapViewEventArgs args = new(MapView.Active);
TOCSelectionChangedEvent.Subscribe(_ => topLevelHandler.CatchUnhandled(OnSelectionChanged), true);
TOCSelectionChangedEvent.Subscribe(_ => topLevelExceptionHandler.CatchUnhandled(OnSelectionChanged), true);
}

private void OnSelectionChanged()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Speckle.Connectors.Common.Threading;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Eventing;
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Connectors.DUI.Logging;
using Speckle.Connectors.DUI.Models;
Expand Down Expand Up @@ -69,7 +70,9 @@ public ArcGISSendBinding(
ILogger<ArcGISSendBinding> logger,
IArcGISConversionSettingsFactory arcGisConversionSettingsFactory,
MapMembersUtils mapMemberUtils,
IThreadContext threadContext
IThreadContext threadContext,
IEventAggregator eventAggregator,
ITopLevelExceptionHandler topLevelExceptionHandler
)
{
_store = store;
Expand All @@ -79,20 +82,19 @@ IThreadContext threadContext
_sendConversionCache = sendConversionCache;
_operationProgressManager = operationProgressManager;
_logger = logger;
_topLevelExceptionHandler = parent.TopLevelExceptionHandler;
_topLevelExceptionHandler = topLevelExceptionHandler;
_arcGISConversionSettingsFactory = arcGisConversionSettingsFactory;
_mapMemberUtils = mapMemberUtils;
_threadContext = threadContext;

Parent = parent;
Commands = new SendBindingUICommands(parent);
SubscribeToArcGISEvents();
_store.DocumentChanged += (_, _) =>
{
_sendConversionCache.ClearCache();
};
eventAggregator.GetEvent<DocumentStoreChangedEvent>().Subscribe(OnDocumentStoreChangedEvent);
}

private void OnDocumentStoreChangedEvent(object _) => _sendConversionCache.ClearCache();

private void SubscribeToArcGISEvents()
{
LayersRemovedEvent.Subscribe(
Expand Down Expand Up @@ -201,23 +203,23 @@ private void SubscribeToAnyDataSourceChange(Table layerTable)
{
RowCreatedEvent.Subscribe(
(args) =>
Parent.TopLevelExceptionHandler.FireAndForget(async () =>
_topLevelExceptionHandler.FireAndForget(async () =>
{
await OnRowChanged(args);
}),
layerTable
);
RowChangedEvent.Subscribe(
(args) =>
Parent.TopLevelExceptionHandler.FireAndForget(async () =>
_topLevelExceptionHandler.FireAndForget(async () =>
{
await OnRowChanged(args);
}),
layerTable
);
RowDeletedEvent.Subscribe(
(args) =>
Parent.TopLevelExceptionHandler.FireAndForget(async () =>
_topLevelExceptionHandler.FireAndForget(async () =>
{
await OnRowChanged(args);
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Speckle.Connectors.ArcGIS.Utils;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Eventing;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Sdk;
Expand All @@ -21,20 +22,23 @@ public class BasicConnectorBinding : IBasicConnectorBinding
private readonly DocumentModelStore _store;
private readonly ISpeckleApplication _speckleApplication;

public BasicConnectorBinding(DocumentModelStore store, IBrowserBridge parent, ISpeckleApplication speckleApplication)
public BasicConnectorBinding(
DocumentModelStore store,
IBrowserBridge parent,
ISpeckleApplication speckleApplication,
IEventAggregator eventAggregator
)
{
_store = store;
_speckleApplication = speckleApplication;
Parent = parent;
Commands = new BasicConnectorBindingCommands(parent);

_store.DocumentChanged += (_, _) =>
parent.TopLevelExceptionHandler.FireAndForget(async () =>
{
await Commands.NotifyDocumentChanged();
});
eventAggregator.GetEvent<DocumentStoreChangedEvent>().Subscribe(OnDocumentStoreChangedEvent);
}

private async Task OnDocumentStoreChangedEvent(object _) => await Commands.NotifyDocumentChanged();

public string GetSourceApplicationName() => _speckleApplication.Slug;

public string GetSourceApplicationVersion() => _speckleApplication.HostApplicationVersion;
Expand Down
12 changes: 6 additions & 6 deletions Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/Config.daml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<ArcGIS defaultAssembly="Speckle.Connectors.ArcGIS3.dll" defaultNamespace="Speckle.Connectors.ArcGIS" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
<AddInInfo id="{6CB1D25C-B8BF-4A33-9099-C1F8D1B32EFC}" version="1.0" desktopVersion="3.0.34047">
<Name>Speckle</Name>
<Description>Speckle connector for ArcGIS</Description>
<Description>Next Gen Speckle Connector (Beta) for ArcGIS</Description>
<Image>Images\AddinDesktop32.png</Image>
<Author>Speckle Systems</Author>
<Company>Speckle Systems</Company>
Expand All @@ -33,14 +33,14 @@
<insertModule id="ConnectorArcGIS_Module" className="SpeckleModule" autoLoad="false" caption="SpeckleModule">
<!-- uncomment to have the control hosted on a separate tab-->
<tabs>
<!--<tab id="Speckle_Tab1" caption="New Tab">
<tab id="Speckle_Tab1" caption="Speckle">
<group refID="Speckle_Group1"/>
</tab>-->
</tab>
</tabs>
<groups>
<!-- comment this out if you have no controls on the Addin tab to avoid
an empty group-->
<group id="Speckle_Group1" caption="Speckle" appearsOnAddInTab="true" keytip="G1">
an empty group. change appearsOnAddinTab to "True" if control is to be in the addin tab-->
<group id="Speckle_Group1" caption="Speckle" appearsOnAddInTab="false" keytip="G1">
<!-- host controls within groups -->
<button refID="SpeckleDUI3_SpeckleDUI3OpenButton" size="large" />
</group>
Expand All @@ -59,7 +59,7 @@
</controls>

<dockPanes>
<dockPane id="SpeckleDUI3_SpeckleDUI3" caption="Speckle (Beta) for ArcGIS" className="SpeckleDUI3ViewModel" keytip="DockPane" initiallyVisible="true" dock="group" dockWith="esri_core_projectDockPane">
<dockPane id="SpeckleDUI3_SpeckleDUI3" caption="Speckle (Beta)" className="SpeckleDUI3ViewModel" keytip="DockPane" initiallyVisible="true" dock="group" dockWith="esri_core_projectDockPane">
<content className="SpeckleDUI3Wrapper" />
</dockPane>
</dockPanes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static void AddArcGIS(this IServiceCollection serviceCollection)
serviceCollection.AddSingleton<IBinding>(sp => sp.GetRequiredService<IBasicConnectorBinding>());
serviceCollection.AddSingleton<IBasicConnectorBinding, BasicConnectorBinding>();

serviceCollection.RegisterTopLevelExceptionHandler();
serviceCollection.AddSingleton(DefaultTraversal.CreateTraversalFunc());

// register send operation and dependencies
Expand Down
2 changes: 2 additions & 0 deletions Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/SpeckleModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.ArcGIS.DependencyInjection;
using Speckle.Connectors.Common;
using Speckle.Connectors.DUI;
using Speckle.Converters.ArcGIS3;
using Speckle.Sdk.Host;
using Module = ArcGIS.Desktop.Framework.Contracts.Module;
Expand Down Expand Up @@ -34,6 +35,7 @@ public SpeckleModule()
services.AddArcGIS();
services.AddArcGISConverters();
Container = services.BuildServiceProvider();
Container.UseDUI();
}

private HostAppVersion GetVersion()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using Speckle.Connectors.Common.Threading;

namespace Speckle.Connectors.ArcGIS.Utils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using ArcGIS.Desktop.Mapping.Events;
using Speckle.Connectors.Common.Threading;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Eventing;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Utils;

Expand All @@ -12,15 +13,18 @@ namespace Speckle.Connectors.ArcGIS.Utils;
public class ArcGISDocumentStore : DocumentModelStore
{
private readonly IThreadContext _threadContext;
private readonly IEventAggregator _eventAggregator;

public ArcGISDocumentStore(
IJsonSerializer jsonSerializer,
ITopLevelExceptionHandler topLevelExceptionHandler,
IThreadContext threadContext
IThreadContext threadContext,
IEventAggregator eventAggregator
)
: base(jsonSerializer)
{
_threadContext = threadContext;
_eventAggregator = eventAggregator;
ActiveMapViewChangedEvent.Subscribe(a => topLevelExceptionHandler.CatchUnhandled(() => OnMapViewChanged(a)), true);
ProjectSavingEvent.Subscribe(
_ =>
Expand All @@ -38,13 +42,16 @@ IThreadContext threadContext
},
true
);
}

public override async Task OnDocumentStoreInitialized()
{
// in case plugin was loaded into already opened Map, read metadata from the current Map
if (!IsDocumentInit && MapView.Active != null)
{
IsDocumentInit = true;
LoadState();
OnDocumentChanged();
await _eventAggregator.GetEvent<DocumentStoreChangedEvent>().PublishAsync(new object());
}
}

Expand All @@ -69,7 +76,7 @@ private void OnProjectSaving()
/// <summary>
/// On map view switch, this event trigger twice, first for outgoing view, second for incoming view.
/// </summary>
private void OnMapViewChanged(ActiveMapViewChangedEventArgs args)
private async void OnMapViewChanged(ActiveMapViewChangedEventArgs args)
{
if (args.IncomingView is null)
{
Expand All @@ -78,7 +85,7 @@ private void OnMapViewChanged(ActiveMapViewChangedEventArgs args)

IsDocumentInit = true;
LoadState();
OnDocumentChanged();
await _eventAggregator.GetEvent<DocumentStoreChangedEvent>().PublishAsync(new object());
}

protected override void HostAppSaveState(string modelCardState) =>
Expand Down
Loading
Loading