Skip to content

Commit c95f364

Browse files
authored
Merge pull request #147 from SoftBIM/dev
Improvement UI/UX - Fix small bug
2 parents 0fb62ee + b702a64 commit c95f364

File tree

14 files changed

+177
-125
lines changed

14 files changed

+177
-125
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# Changelog
2+
- 2023-09-13 **2.0.2**
3+
- Improvement user interface and user experience with coding.
4+
- Add new button create new file
5+
- Add new button save as file
6+
- Fix bug output with language is chines or Japanese
7+
- Follow up package IronPython latest.
8+
- Add more shortcut default.
29
- 2023-04-14 **2.0.1**
310
- Support Autodesk Revit version 2024.
411
- 2022-12-16 **2.0.0**

Installer/Installer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
const string projectName = "RevitPythonShell";
1313
const string outputName = "RevitPythonShell";
1414
const string outputDir = "output";
15-
const string version = "2.0.1";
15+
const string version = "2.0.2";
1616

1717
var fileName = new StringBuilder().Append(outputName).Append("-").Append(version);
1818
var project = new Project

PythonConsoleControl/PythonConsoleControl.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<DebugType>full</DebugType>
1414
</PropertyGroup>
1515
<ItemGroup>
16-
<PackageReference Include="AvalonEdit" Version="6.0.1" />
17-
<PackageReference Include="IronPython" Version="3.4.0" />
16+
<PackageReference Include="AvalonEdit" Version="6.3.0.90" />
17+
<PackageReference Include="IronPython" Version="3.4.1" />
1818
</ItemGroup>
1919
<ItemGroup>
2020
<Reference Include="IronPython">

PythonConsoleControl/PythonOutputStream.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Copyright (c) 2010 Joe Moorhouse
22

3+
using System;
34
using System.IO;
45
using System.Text;
6+
using System.Text.RegularExpressions;
57

68
namespace PythonConsoleControl
79
{
@@ -63,8 +65,18 @@ public override int Read(byte[] buffer, int offset, int count)
6365
/// </summary>
6466
public override void Write(byte[] buffer, int offset, int count)
6567
{
66-
string text = UTF8Encoding.UTF8.GetString(buffer, offset, count);
68+
string text = Encoding.UTF8.GetString(buffer, offset, count);
69+
text = DecodeUnicodeEscapes(text);
6770
textEditor.Write(text);
6871
}
72+
private string DecodeUnicodeEscapes(string input)
73+
{
74+
return Regex.Replace(input, @"\\u[0-9a-fA-F]{4}", match =>
75+
{
76+
var hex = match.Value.Substring(2);
77+
int charValue = Convert.ToInt32(hex, 16);
78+
return char.ConvertFromUtf32(charValue);
79+
});
80+
}
6981
}
7082
}

RevitPythonShell/Properties/launchSettings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
"Revit 2023": {
5252
"commandName": "Executable",
5353
"executablePath": "%ProgramW6432%\\Autodesk\\Revit 2023\\Revit.exe"
54+
},
55+
"Revit 2024": {
56+
"commandName": "Executable",
57+
"executablePath": "%ProgramW6432%\\Autodesk\\Revit 2024\\Revit.exe"
5458
}
5559
}
5660
}
1.43 KB
Loading
985 Bytes
Loading
1.01 KB
Loading
2.16 KB
Loading
1.06 KB
Loading

0 commit comments

Comments
 (0)