File tree 2 files changed +42
-0
lines changed
2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ docs/_site/
19
19
# IDE stuff
20
20
* .sublime- *
21
21
* .code-workspace
22
+ .vscode
Original file line number Diff line number Diff line change
1
+ <# PS script to use with the pucelle.run-and-save Plugin for VSC #>
2
+ <# Put the following into your *.code-workspace file:
3
+ "settings": {
4
+ "runOnSave.commands": [
5
+ {
6
+ "match": "\\.gdl$",
7
+ "command": "Powershell.exe -File ${workspaceFolder}\\makeGSM.ps1 ${file}",
8
+ "runIn": "terminal",
9
+ "runningStatusMessage": "LP_XMLConverter"
10
+ }
11
+ ]
12
+ }
13
+ #>
14
+ param (
15
+ [string ] $source ,
16
+ [string ] $dest = $null
17
+ )
18
+
19
+ $AC_VER = " 24"
20
+ $LPXCONV_PATH = " C:/Program Files/GRAPHISOFT/ARCHICAD $AC_VER /LP_XMLConverter.exe"
21
+ $COMM = " hsf2libpart"
22
+
23
+ # $source is a path to a GDL file
24
+ $source_base = Split-Path - Path $source | Split-Path
25
+ # went two folders up
26
+ $main_name = Split-Path - Path $source_base - Leaf
27
+
28
+ if ($dest -eq " " ) {
29
+ $dest = $source_base + " .gsm"
30
+ }
31
+
32
+ # write-host $source_base
33
+ # write-host $dest
34
+
35
+ # -NoNewWindow will not spawn a new terminal but use the VSC one instead
36
+ # and a stupid trick:
37
+ # those weirdos @MS didn't thought of spaces, so we do have to
38
+ # with ridiculous triple quotes
39
+ Start-Process - NoNewWindow - FilePath " `" $LPXCONV_PATH `" " - ArgumentList $COMM , " `" $source_base `" " , " `" $dest `" "
40
+
41
+ # write-host "Finished."
You can’t perform that action at this time.
0 commit comments