Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
eirannejad committed May 17, 2021
2 parents 7eb0a4e + 868e370 commit b074f29
Show file tree
Hide file tree
Showing 148 changed files with 1,117 additions and 250 deletions.
Binary file modified bin/engines/CPY378/pyRevitLabs.PythonNet.dll
Binary file not shown.
Binary file modified bin/engines/CPY385/pyRevitLabs.PythonNet.dll
Binary file not shown.
Binary file modified bin/engines/IPY2710/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY2710/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitLabs.IronPython.Modules.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitLabs.IronPython.SQLite.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitLabs.IronPython.Wpf.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitLabs.IronPython.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitLabs.Microsoft.Dynamic.dll
Binary file not shown.
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitLabs.Microsoft.Scripting.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY273/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY273/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY277/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY277/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY278/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY278/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY279/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY279/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Common.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonCLI.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonWPF.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.DeffrelDB.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Emojis.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Json.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Language.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.MahAppsMetro.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.NLog.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.PyRevit.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.AutoCAD.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.Navisworks.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.Revit.dll
Binary file not shown.
Binary file modified bin/pyrevit-autocomplete.exe
Binary file not shown.
Binary file modified bin/pyrevit-doctor.exe
Binary file not shown.
48 changes: 48 additions & 0 deletions bin/pyrevit-hosts.json
Original file line number Diff line number Diff line change
Expand Up @@ -1366,5 +1366,53 @@
"build": "20201109_1530",
"target": "x64",
"notes": "https://help.autodesk.com/view/RVT/2021/ENU/?guid=RevitReleaseNotes_2021updates_html"
},
{
"meta": {
"schema": "1.0",
"source": "https://help.autodesk.com/view/RVT/2022/ENU/?guid=RevitReleaseNotes_2022updates_html"
},
"product": "Autodesk Revit",
"release": "2022 First Customer Ship",
"version": "22.0.2.392",
"build": "20210224_1515",
"target": "x64",
"notes": "https://help.autodesk.com/view/RVT/2022/ENU/?guid=RevitReleaseNotes_2022updates_html"
},
{
"meta": {
"schema": "1.0",
"source": "https://up.autodesk.com/2019/RVT/Autodesk_Revit_2019_2_3_Hotfix_Readme.html"
},
"product": "Autodesk Revit",
"release": "2019.2.3",
"version": "19.2.30.41",
"build": "20210416_1515",
"target": "x64",
"notes": "https://up.autodesk.com/2019/RVT/Autodesk_Revit_2019_2_3_Hotfix_Readme.html"
},
{
"meta": {
"schema": "1.0",
"source": "https://help.autodesk.com/view/RVT/2020/ENU/?guid=RevitReleaseNotes_2020updates_html"
},
"product": "Autodesk Revit",
"release": "2020.2.4",
"version": "20.2.40.65",
"build": "20210420_1515",
"target": "x64",
"notes": "https://help.autodesk.com/view/RVT/2020/ENU/?guid=RevitReleaseNotes_2020updates_html"
},
{
"meta": {
"schema": "1.0",
"source": "https://help.autodesk.com/view/RVT/2021/ENU/?guid=RevitReleaseNotes_2021updates_html"
},
"product": "Autodesk Revit",
"release": "2021.1.3",
"version": "21.1.30.74",
"build": "20210426_1515",
"target": "x64",
"notes": "https://help.autodesk.com/view/RVT/2021/ENU/?guid=RevitReleaseNotes_2021updates_html"
}
]
12 changes: 12 additions & 0 deletions bin/pyrevit-products.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"product": "pyRevit",
"release": "4.8.8",
"version": "4.8.8",
"key": "{CA372AB6-355A-4270-91DD-144DF75E1B57}"
},
{
"product": "pyRevit",
"release": "4.8.7",
Expand Down Expand Up @@ -233,6 +239,12 @@
"version": "4.6.1",
"key": "{EF91A585-DC0C-43B8-B88B-4C130F430E84}"
},
{
"product": "pyRevit CLI",
"release": "4.8.8",
"version": "4.8.8",
"key": "{8E0191BC-C5DB-4F0E-8F52-6DF04C2B8CE8}"
},
{
"product": "pyRevit CLI",
"release": "4.8.7",
Expand Down
Binary file modified bin/pyrevit-stubsbuilder.exe
Binary file not shown.
Binary file modified bin/pyrevit-telemetryserver.exe
Binary file not shown.
Binary file modified bin/pyrevit-toast.exe
Binary file not shown.
Empty file added bin/pyrevit.admin
Empty file.
Binary file modified bin/pyrevit.exe
Binary file not shown.
Empty file added bin/pyrevit.user
Empty file.
4 changes: 2 additions & 2 deletions dev/pyRevit/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;

[assembly: AssemblyVersion("4.8.7")]
[assembly: AssemblyFileVersion("4.8.7")]
[assembly: AssemblyVersion("4.8.8")]
[assembly: AssemblyFileVersion("4.8.8")]
14 changes: 8 additions & 6 deletions dev/pyRevitLabs/pyRevitCLI/PyRevitCLI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ private static void ProcessArguments() {
else {
// try parse the engine version as an integer e.g. 277 for 2.7.7
if (int.TryParse(engStrVer, out var engIntVer))
engineVersion = (PyRevitEngineVersion)engIntVer;
engineVersion = (PyRevitEngineVersion)engIntVer;
}

if (engineVersion is null) {
Expand Down Expand Up @@ -548,7 +548,8 @@ private static void ProcessArguments() {
revitYear: TryGetValue("--revit"),
runOptions: new PyRevitRunnerOptions() {
PurgeTempFiles = arguments["--purge"].IsTrue,
ImportPath = TryGetValue("--import", null)
ImportPath = TryGetValue("--import", null),
AllowDialogs = arguments["--allowdialogs"].IsTrue
},
targetIsFileList: true
);
Expand All @@ -560,7 +561,8 @@ private static void ProcessArguments() {
revitYear: TryGetValue("--revit"),
runOptions: new PyRevitRunnerOptions() {
PurgeTempFiles = arguments["--purge"].IsTrue,
ImportPath = TryGetValue("--import", null)
ImportPath = TryGetValue("--import", null),
AllowDialogs = arguments["--allowdialogs"].IsTrue
}
);
}
Expand Down Expand Up @@ -699,8 +701,8 @@ private static void ProcessArguments() {
Console.WriteLine(string.Format("User {0} config",
PyRevitConfigs.GetUserCanConfig() ? "CAN" : "CAN NOT"));

}
}

else if (all("colordocs")) {
if (any("enable", "disable"))
PyRevitConfigs.SetColorizeDocs(arguments["enable"].IsTrue);
Expand Down Expand Up @@ -889,7 +891,7 @@ private static void ProcessArguments() {

else if (TryGetValue("<doctor_command>") is var doctorCommand && doctorCommand != null)
PyRevitCLIAppCmds.RunDoctor(doctorCommand, dryRun: arguments["--dryrun"].IsTrue);

else if (all("doctor", "--list"))
PyRevitCLIAppCmds.RunDoctor("--list");

Expand Down
7 changes: 4 additions & 3 deletions dev/pyRevitLabs/pyRevitCLI/PyRevitCLIAppHelps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal static class PyRevitCLIAppHelps {
internal static void
PrintHelp(PyRevitCLICommandType commandType) {
switch (commandType) {

case PyRevitCLICommandType.Main:
BuildHelp(
null,
Expand Down Expand Up @@ -57,7 +57,7 @@ internal static void
}
);
break;

case PyRevitCLICommandType.Env:
BuildHelp(
new List<string>() { "env" },
Expand Down Expand Up @@ -297,6 +297,7 @@ internal static void
{ "<model_file>", "Target Revit model file path" },
{ "--purge", "Remove temporary run environment after completion" },
{ "--import=<import_path>", "Copy content of this folder into the runtime temp path." },
{ "--allowdialogs", "To allow dialogs during journal playback" }
});
break;

Expand Down Expand Up @@ -447,7 +448,7 @@ private static string BuildOptions(string baseHelp, string header, IDictionary<s
if (options != null) {
baseHelp += header + Environment.NewLine;
foreach (var optionPair in options) {
baseHelp +=
baseHelp +=
string.Format(outputFormat, optionPair.Key, optionPair.Value)
+ Environment.NewLine;
}
Expand Down
25 changes: 20 additions & 5 deletions dev/pyRevitLabs/pyRevitCLI/PyRevitCLIRevitCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ internal static void
int revitYearNumber = 0;
int.TryParse(revitYear, out revitYearNumber);


// setup a list of models
var modelFiles = new List<string>();
// if target file is a list of model paths
Expand All @@ -176,7 +176,7 @@ internal static void
else
modelFiles.Add(targetFile);


// verify all models are accessible
foreach (string modelFile in modelFiles)
if (!CommonUtils.VerifyFile(modelFile))
Expand All @@ -197,8 +197,23 @@ internal static void
throw new Exception($"Can not detect the Revit version of model at \"{modelFile}\". Model might be newer than specified version {revitYearNumber}.");
}
}
else
revitYearNumber = RevitProduct.ListInstalledProducts().Max(r => r.ProductYear);
else {
// determine revit model version from given files
foreach (string modelFile in modelFiles) {
var modelInfo = new RevitModelFile(modelFile);
if (modelInfo.RevitProduct != null) {
if (revitYearNumber == 0)
revitYearNumber = modelInfo.RevitProduct.ProductYear;
else if (modelInfo.RevitProduct.ProductYear > revitYearNumber)
revitYearNumber = modelInfo.RevitProduct.ProductYear;
}
}

// if could not determine revit version from given files,
// use latest version
if (revitYearNumber == 0)
revitYearNumber = RevitProduct.ListInstalledProducts().Max(r => r.ProductYear);
}

// now run
if (revitYearNumber != 0) {
Expand Down Expand Up @@ -288,7 +303,7 @@ internal static void
}
}
}

}

// privates:
Expand Down
6 changes: 3 additions & 3 deletions dev/pyRevitLabs/pyRevitCLI/Resources/UsagePatterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ Usage:
pyrevit revits fileinfo <file_or_dir_path> [--csv=<output_file>] [--rvt] [--rte] [--rfa] [--rft]
pyrevit run (-h | --help)
pyrevit run commands
pyrevit run <script_or_command_name> [--revit=<revit_year>] [--purge] [--import=<import_path>]
pyrevit run <script_or_command_name> --models=<model_list_file> --revit=<revit_year> [--purge] [--import=<import_path>]
pyrevit run <script_or_command_name> <model_file> [--revit=<revit_year>] [--purge] [--import=<import_path>]
pyrevit run <script_or_command_name> [--revit=<revit_year>] [--purge] [--allowdialogs] [--import=<import_path>]
pyrevit run <script_or_command_name> --models=<model_list_file> --revit=<revit_year> [--purge] [--allowdialogs] [--import=<import_path>]
pyrevit run <script_or_command_name> <model_file> [--revit=<revit_year>] [--purge] [--allowdialogs] [--import=<import_path>]
pyrevit caches (-h | --help)
pyrevit caches [bim360] clear (--all | <revit_year>) [--log=<log_file>]
pyrevit config (-h | --help)
Expand Down
4 changes: 4 additions & 0 deletions dev/pyRevitLabs/pyRevitLabs.Common/UserEnv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public static List<string> GetInstalledDotnetCoreTargetPacks() {
return targetPackPaths;
}

public static string GetExecutingUserName() {
return string.Format("{0}\\{1}", Environment.UserDomainName, Environment.UserName);
}

public static string GetLoggedInUserName() {
try {
ConnectionOptions oConn = new ConnectionOptions();
Expand Down
Loading

0 comments on commit b074f29

Please sign in to comment.