Skip to content

Commit

Permalink
Better naming for definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhankoral committed Jul 16, 2024
1 parent 3ea6841 commit 1f715fe
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ out List<InstanceProxy> instanceProxiesWithSameDefinition
applicationId = definitionId.ToString(),
Objects = new(),
MaxDepth = depth,
["name"] = definition.Name,
Name = definition.Name,
["comments"] = definition.Comments,
["units"] = definition.Units // ? not sure needed?
};
Expand Down Expand Up @@ -168,15 +168,8 @@ public BakeResult BakeInstances(

var record = new BlockTableRecord();
var objectIds = new ObjectIdCollection();
record.Name = baseLayerName;
if (definitionProxy["name"] is string name)
{
record.Name += name;
}
else
{
record.Name += definitionProxy.applicationId;
}
// We're expecting to have Name prop always for definitions. If there is an edge case, ask to Dim or Ogu
record.Name = $"{definitionProxy.Name}-({definitionProxy.applicationId})-{baseLayerName}";

foreach (var entity in constituentEntities)
{
Expand Down
26 changes: 13 additions & 13 deletions Connectors/Revit/Speckle.Connectors.Revit2022/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@
},
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "4.0.1-alpha.3",
"contentHash": "7/lg9LDI3TZLiI7FhI2IhRrTzsZyDrQw1rG/S3kRtx0IU3raWzRHL4W5zvHV8LdWkqJEztS/9dUgLNYHV70o5Q=="
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
Expand Down Expand Up @@ -451,7 +451,7 @@
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Connectors.Utils": "[1.0.0, )",
"Speckle.Core": "[3.0.1-dev.25, )",
"Speckle.Core": "[3.0.0-dev.51, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
Expand All @@ -460,14 +460,14 @@
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Core": "[3.0.1-dev.25, )"
"Speckle.Core": "[3.0.0-dev.51, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-dev.25, )"
"Speckle.Objects": "[3.0.0-dev.51, )"
}
},
"speckle.converters.common.dependencyinjection": {
Expand Down Expand Up @@ -515,9 +515,9 @@
},
"Speckle.Core": {
"type": "CentralTransitive",
"requested": "[3.0.1-dev.25, )",
"resolved": "3.0.1-dev.25",
"contentHash": "wcLNocrTfNCmhtJH/Hp/1u18Fp57apIdYvQnfCAAfo0txfNjL5hzx+wtFt5PlHPjF/mPssESuhLa89pvrMFvxw==",
"requested": "[3.0.0-dev.51, )",
"resolved": "3.0.0-dev.51",
"contentHash": "RdknA3s6GJ+F3uQiVrkJfqULg+utIyzfgffXg2eKW9K9tIcQiGwouzNkWAEhCvqIHJDf/CCcpoRXsD1ajGiYwA==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
Expand All @@ -533,17 +533,17 @@
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.DoubleNumerics": "4.0.1-alpha.3",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2"
}
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.0.1-dev.25, )",
"resolved": "3.0.1-dev.25",
"contentHash": "bxYDptn2hnUFdzFOgmEU/YS8ZjcrHCHz4bFwKLDz1rA9ytkBIUvNuTYZpKZz3h9jVJxrgPhh1qDLqUNgK56hdA==",
"requested": "[3.0.0-dev.51, )",
"resolved": "3.0.0-dev.51",
"contentHash": "9453uaTJtavJ7rlPEi1G4vLY/cwESzW3JSZMO1emJB5zrahoPCJWu916hFRCwFKbyQQf4rKmkNyv7fAnCx/2sA==",
"dependencies": {
"Speckle.Core": "3.0.1-dev.25"
"Speckle.Core": "3.0.0-dev.51"
}
},
"Speckle.Revit.API": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ out List<InstanceProxy> instanceProxiesWithSameDefinition
applicationId = instanceDefinitionId,
Objects = new List<string>(),
MaxDepth = depth,
["name"] = instance.InstanceDefinition.Name,
Name = instance.InstanceDefinition.Name,
["description"] = instance.InstanceDefinition.Description
};

Expand Down Expand Up @@ -168,7 +168,7 @@ public BakeResult BakeInstances(
}

// POC: Currently we're relying on the definition name for identification if it's coming from speckle and from which model; could we do something else?
var defName = $"{baseLayerName} ({definitionProxy.applicationId})";
var defName = $"{definitionProxy.Name}-({definitionProxy.applicationId})-{baseLayerName}";
var defIndex = doc.InstanceDefinitions.Add(
defName,
"No description", // POC: perhaps bring it along from source? We'd need to look at ACAD first
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@
},
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "4.0.1-alpha.3",
"contentHash": "7/lg9LDI3TZLiI7FhI2IhRrTzsZyDrQw1rG/S3kRtx0IU3raWzRHL4W5zvHV8LdWkqJEztS/9dUgLNYHV70o5Q=="
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
Expand Down Expand Up @@ -355,7 +355,7 @@
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-dev.25, )"
"Speckle.Objects": "[3.0.0-dev.51, )"
}
},
"speckle.converters.common.dependencyinjection": {
Expand Down Expand Up @@ -385,9 +385,9 @@
},
"Speckle.Core": {
"type": "CentralTransitive",
"requested": "[3.0.1-dev.25, )",
"resolved": "3.0.1-dev.25",
"contentHash": "wcLNocrTfNCmhtJH/Hp/1u18Fp57apIdYvQnfCAAfo0txfNjL5hzx+wtFt5PlHPjF/mPssESuhLa89pvrMFvxw==",
"requested": "[3.0.0-dev.51, )",
"resolved": "3.0.0-dev.51",
"contentHash": "RdknA3s6GJ+F3uQiVrkJfqULg+utIyzfgffXg2eKW9K9tIcQiGwouzNkWAEhCvqIHJDf/CCcpoRXsD1ajGiYwA==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
Expand All @@ -403,17 +403,17 @@
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.DoubleNumerics": "4.0.1-alpha.3",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2"
}
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.0.1-dev.25, )",
"resolved": "3.0.1-dev.25",
"contentHash": "bxYDptn2hnUFdzFOgmEU/YS8ZjcrHCHz4bFwKLDz1rA9ytkBIUvNuTYZpKZz3h9jVJxrgPhh1qDLqUNgK56hdA==",
"requested": "[3.0.0-dev.51, )",
"resolved": "3.0.0-dev.51",
"contentHash": "9453uaTJtavJ7rlPEi1G4vLY/cwESzW3JSZMO1emJB5zrahoPCJWu916hFRCwFKbyQQf4rKmkNyv7fAnCx/2sA==",
"dependencies": {
"Speckle.Core": "3.0.1-dev.25"
"Speckle.Core": "3.0.0-dev.51"
}
},
"Speckle.Revit.API": {
Expand Down
22 changes: 11 additions & 11 deletions Converters/Revit/Speckle.Converters.Revit2022/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@
},
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "4.0.1-alpha.3",
"contentHash": "7/lg9LDI3TZLiI7FhI2IhRrTzsZyDrQw1rG/S3kRtx0IU3raWzRHL4W5zvHV8LdWkqJEztS/9dUgLNYHV70o5Q=="
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
Expand Down Expand Up @@ -361,7 +361,7 @@
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-dev.25, )"
"Speckle.Objects": "[3.0.0-dev.51, )"
}
},
"speckle.converters.common.dependencyinjection": {
Expand All @@ -383,9 +383,9 @@
},
"Speckle.Core": {
"type": "CentralTransitive",
"requested": "[3.0.1-dev.25, )",
"resolved": "3.0.1-dev.25",
"contentHash": "wcLNocrTfNCmhtJH/Hp/1u18Fp57apIdYvQnfCAAfo0txfNjL5hzx+wtFt5PlHPjF/mPssESuhLa89pvrMFvxw==",
"requested": "[3.0.0-dev.51, )",
"resolved": "3.0.0-dev.51",
"contentHash": "RdknA3s6GJ+F3uQiVrkJfqULg+utIyzfgffXg2eKW9K9tIcQiGwouzNkWAEhCvqIHJDf/CCcpoRXsD1ajGiYwA==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
Expand All @@ -401,17 +401,17 @@
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.DoubleNumerics": "4.0.1-alpha.3",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2"
}
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.0.1-dev.25, )",
"resolved": "3.0.1-dev.25",
"contentHash": "bxYDptn2hnUFdzFOgmEU/YS8ZjcrHCHz4bFwKLDz1rA9ytkBIUvNuTYZpKZz3h9jVJxrgPhh1qDLqUNgK56hdA==",
"requested": "[3.0.0-dev.51, )",
"resolved": "3.0.0-dev.51",
"contentHash": "9453uaTJtavJ7rlPEi1G4vLY/cwESzW3JSZMO1emJB5zrahoPCJWu916hFRCwFKbyQQf4rKmkNyv7fAnCx/2sA==",
"dependencies": {
"Speckle.Core": "3.0.1-dev.25"
"Speckle.Core": "3.0.0-dev.51"
}
}
}
Expand Down

0 comments on commit 1f715fe

Please sign in to comment.