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

Revit receive first pass: reference geometry workflow (CNX-403) #254

Merged
merged 37 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
54a3a45
feat(dui3): re-enables receive binding
didimitrie Sep 9, 2024
0af84a8
chore(revit): drastic cleanup
didimitrie Sep 9, 2024
bdbb20e
feat(revit): starts scaffolding revit root to host converter
didimitrie Sep 9, 2024
24f86ce
RenderMaterialToHostConverter added back
kekesidavid Sep 10, 2024
a4abd26
casting to GeometryObject instead of GeometryElement
kekesidavid Sep 10, 2024
8f84a9e
feat(dui3): fallback display values and refactors out material converter
didimitrie Sep 10, 2024
807d9ff
feat(dui3): creates DS and adds point support
didimitrie Sep 10, 2024
05f30e3
feat(dui3): closed nurbs fallback to display values
didimitrie Sep 10, 2024
cfb20de
David/cnx 443 selection (#231)
kekesidavid Sep 10, 2024
7f1e00e
wip
kekesidavid Sep 12, 2024
71f857f
Merge branch 'dev' into grouping-sandbox
didimitrie Sep 12, 2024
9823cec
feat(revit): wraps receive in correct context
didimitrie Sep 12, 2024
92bbddb
wip
didimitrie Sep 12, 2024
5d8d572
feat(dui3): adds prototype grouping by collection
didimitrie Sep 12, 2024
18c8d44
remove invalid characters from group name
kekesidavid Sep 12, 2024
7ce34d6
hide warnings preprocessor
kekesidavid Sep 12, 2024
38ed784
exception handling and error log
kekesidavid Sep 12, 2024
e1b0832
added cancellation and progress reporting
kekesidavid Sep 12, 2024
81f35f6
chore: comments and minor cleanup
didimitrie Sep 12, 2024
0cc0897
Merge pull request #237 from specklesystems/grouping-sandbox
didimitrie Sep 12, 2024
0e87060
David/cnx 409 2 add rendermaterial and color manager to connector (#242)
kekesidavid Sep 16, 2024
e77b2e4
Minor cleanup
oguzhankoral Sep 16, 2024
10d0988
Add object application id into objects of its layer render material p…
oguzhankoral Sep 16, 2024
90834bd
feat(dui3): adds compatibility for objects with display values
didimitrie Sep 16, 2024
1de58a3
Merge pull request #243 from specklesystems/oguzhan/cnx-470-add-suppo…
didimitrie Sep 16, 2024
57407d4
Use LocalToGlobal logic for revit receive
oguzhankoral Sep 16, 2024
e1053df
Use common local to global util for arcgis too
oguzhankoral Sep 16, 2024
206524a
Remove unnecessary registration
oguzhankoral Sep 16, 2024
70e43dd
Remove using
oguzhankoral Sep 16, 2024
4e523ac
Remove unnecessart ToList
oguzhankoral Sep 16, 2024
b8b9355
Register LocalToGlobalConverterUtils for connectors not as common
oguzhankoral Sep 17, 2024
f74f9bc
Merge pull request #244 from specklesystems/oguzhan/cnx-442-handle-in…
didimitrie Sep 17, 2024
5caf403
purge materials and groups in Revit before update (#245)
kekesidavid Sep 18, 2024
5e52cdd
assign categories to DirectShapes after receive, updated revit invali…
kekesidavid Sep 18, 2024
2fa3477
Merge remote-tracking branch 'origin/dev' into revit-receive
oguzhankoral Sep 19, 2024
dc394fa
Post conflict resolving problems
oguzhankoral Sep 19, 2024
7a42a10
minor changes, logging, comments (#257)
kekesidavid Sep 19, 2024
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
Prev Previous commit
Next Next commit
assign categories to DirectShapes after receive, updated revit invali…
…d chars (#253)
  • Loading branch information
kekesidavid authored Sep 18, 2024
commit 5e52cdd3c16ca3cac46f6aca0d4d99f386dbd91d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ namespace Speckle.Connectors.Revit.HostApp;

public class RevitUtils
{
private const string REVIT_INVALID_CHARS = @"<>/\:;""?*|=,‘()";
// see Revit Parameter Name Limitations here
// https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/3RVyShGL7OMlDJPLasuKFL.html
private const string REVIT_INVALID_CHARS = @"\:{}[]|;<>?`~";

public string RemoveInvalidChars(string str)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections;
using Autodesk.Revit.DB;
using Speckle.Converters.Common;
using Speckle.Converters.Common.Objects;
using Speckle.Converters.RevitShared.Helpers;
Expand Down Expand Up @@ -59,10 +60,21 @@ public object Convert(Base target)
throw new SpeckleConversionException($"No supported conversion for {target.speckle_type} found.");
}

var ds = DB.DirectShape.CreateElement(
_revitContextStack.Current.Document,
new DB.ElementId(DB.BuiltInCategory.OST_GenericModel) // TODO: inherit category from target if any.
);
var category = DB.BuiltInCategory.OST_GenericModel;
if (target["category"] is string categoryString)
{
var res = Enum.TryParse($"OST_{categoryString}", out DB.BuiltInCategory cat);
if (res)
{
var c = Category.GetCategory(_revitContextStack.Current.Document, cat);
if (c is not null && DirectShape.IsValidCategoryId(c.Id, _revitContextStack.Current.Document))
{
category = cat;
}
}
}

var ds = DB.DirectShape.CreateElement(_revitContextStack.Current.Document, new DB.ElementId(category));
ds.SetShape(geometryObjects);

return ds;
Expand Down