Skip to content

Instantly share code, notes, and snippets.

View chuongmep's full-sized avatar
👋
Loading...

Chuong Ho chuongmep

👋
Loading...
View GitHub Profile
// get all reference with connector 1
List<Autodesk.Revit.DB.Connector> connectorSets = connectors1.Select(x => x.AllRefs)
.SelectMany(x => x.Cast<Autodesk.Revit.DB.Connector>())
.ToList();
// disconnect all reference with connector 1
connectors1.ForEach(x =>
{
connectorSets.ForEach(a =>
{
if (x.IsConnectedTo(a))
[01/08/2024 09:07:40] Job information:
{
"CommandLine": [
"$(engine.path)\\\\revitcoreconsole.exe /i \"$(args[inputFile].path)\" /al \"$(appbundles[TestDynamoRevitDA].path)\""
],
"Settings": {
"script": {},
"dasOpenNetwork": {
"value": "true",
"isEnvironmentVariable": true
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
TypeId UnitLabel Version
autodesk.unit.unit:1ToRatio 1: 1.0.1
autodesk.unit.unit:acres acres 1.0.1
autodesk.unit.unit:amperes A 1.0.0
autodesk.unit.unit:atmospheres atm 1.0.1
autodesk.unit.unit:bars bar 1.0.1
autodesk.unit.unit:britishThermalUnits Btu 1.0.1
autodesk.unit.unit:britishThermalUnitsPerDegreeFahrenheit BTU/°F 1.0.1
autodesk.unit.unit:britishThermalUnitsPerHour Btu/h 1.0.1
autodesk.unit.unit:britishThermalUnitsPerHourCubicFoot Btu/(h·ft³) 1.0.1
public override void Action()
{
// get all forgetypeUnit
IList<ForgeTypeId> forgeTypeIds = UnitUtils.GetAllUnits();
List<UnitsData> UnitDict = new List<UnitsData>();
foreach (var forgeTypeId in forgeTypeIds)
{
// get label symbol
var symbol = FormatOptions
.GetValidSymbols(forgeTypeId).FirstOrDefault(x => x.Empty() == false);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[12/06/2023 09:43:59] Job information:
{
"CommandLine": [
"$(engine.path)\\\\revitcoreconsole.exe /i \"$(args[inputFile].path)\" /al \"$(appbundles[ExtractRoomApp].path)\""
],
"Settings": {
"script": {},
"dasOpenNetwork": {
"value": "true",
"isEnvironmentVariable": true
public async Task<Status> ExecuteWorkItem(string token, string projectId, string versionId, string modelName,
string callBackUrl)
{
Console.WriteLine("ActivityId: " + _configuration.ActivityFullName);
dynamic downloadUrl = await BuildDownloadURL(token, projectId, versionId).ConfigureAwait(false);
Console.WriteLine("Download URL: " + downloadUrl.Url);
XrefTreeArgument treeArgument = await BuildUploadURL(token).ConfigureAwait(false);
Console.WriteLine("TreeArgument: " + treeArgument.Url);
WorkItem workItemSpec = new WorkItem()
{
{
"version": "1.0",
"resourceUrn": "...?version=2",
"hook": {
"hookId": "da040095-393f-40aa-866c-a6c01015e730",
"tenant": "...",
"callbackUrl": "https://webhook.site/25ad18c1-2f09-4148-bfd1-2c9cd2618a9b",
"createdBy": "PUOkTUuLkIGtlYeFNbNG9W0PRdmUjGKk",
"event": "dm.version.modified",
"createdDate": "2023-11-27T07:42:51.833+00:00",
public async Task<Status> ExecuteWorkItem(string token, string projectId, string versionId,string modelName, string callBackUrl)
{
Console.WriteLine("ActivityId: " + _configuration.ActivityFullName);
dynamic downloadUrl = await BuildDownloadURL(token, projectId, versionId).ConfigureAwait(false);
Console.WriteLine("Download URL: " + downloadUrl.Url);
XrefTreeArgument treeArgument = await BuildUploadURL(token).ConfigureAwait(false);
Console.WriteLine("TreeArgument: " + treeArgument.Url);
WorkItem workItemSpec = new WorkItem()
{
ActivityId = _configuration.ActivityFullName,