Skip to content

Commit 26f5d26

Browse files
committed
Update README.md
1 parent 468d37c commit 26f5d26

File tree

1 file changed

+46
-8
lines changed

1 file changed

+46
-8
lines changed

README.md

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Copy _one_ of these into the file on the right and save:
5858
![light color scheme](https://i.imgur.com/OQx2IF2.png)
5959

6060
#### Don't like the themes?
61-
You can edit the `.sublime-color-scheme` files directly. But remember to copy and rename the provided one. Otherwise an update would overwrite your changes.
61+
You can edit the `.sublime-color-scheme` files directly – they are nothing else than `.json` files basically. But remember to copy your own color scheme into the `User` folder! Otherwise an update would overwrite your changes. (Of course you then need to point Sublime Text to your new color scheme like above.)
6262

6363
### GoTo, Auto completion, Snippets
6464
The "Goto" feature of Sublime Text is pretty powerful. To gain full access you must use [Sublime projects](#workflow). If you e.g. quickly want to got to a subroutine place your cursor into the name and press <kbd>F12</kbd>. You will then jump directly to the definition.
@@ -73,27 +73,65 @@ You will find all the shipped snippets in the `Snippets` folder.
7373
## Workflow
7474
With the advent of ARCHICAD 23 we don't longer need third-party apps like [GDLnucleus](http://www.opengdl.org/Default.aspx?tabid=9748) for a Sublime Text driven workflow. The **LP_XMLConverter**, which is part of every Archicad installation, can now convert `.gsm` directly into subsequent `.gdl` scripts and vice-versa. This means an end to the abundant copy & pasting orgy of the past.
7575

76-
To use this feature you first need to set the path to where your ARCHICAD is installed. Open the package settings again and copy the respective item from the left to the right pane. Change the path accordingly.
76+
To use this feature you first need to set the path to where your ARCHICAD is installed. Open the package settings again and copy the respective item from the left to the right pane. Change the path accordingly.
77+
7778
Afterwards drag and drop a folder with your 'gsm' (I recommend different folders for different gsm's) into Sublime Text and then create a Sublime project via `Project > Save Project As…`. Other benefits are a better working 'goto', 'auto completion', and the possibility to fast switch between different coding sessions on various gsm's.
7879
You can now use the the two conversion options in `Tools > GDL`. For a quick access both items are reachable via a right mouse click on the editor pane. There are also key bindings on each.
7980
The default for `Convert to script (gsm → hsf/gdl)` is <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>H</kbd>. `Build GSM from HSF (hsf/gdl → gsm)` has <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>alt</kbd>+<kbd>G</kbd>. Of course these can be adjusted to your taste.
8081

8182
### Places
82-
If you convert between HSF and GSM the default place will be next to each other. However you can define a _global default path_ where any GSMs should be deployed to. This is useful if you have a central library already linked in Archicad.
83+
If you convert between HSF and GSM the default place will be next to each other. However you can define a _global default path_ (see [example](#example) below) where any GSMs should be deployed to. This is useful if you have a central library already linked in Archicad.
8384
Of course you can overwrite this behavior by having a path on _project basis_. This can be set by opening the corresponding `.sublime-project` file and adding:
8485

8586
```json
86-
"cmdargs":
87+
{
88+
"cmdargs":
8789
{
88-
"proj_gsm_path": "C:/Users/runxel/Desktop",
89-
},
90+
"proj_gsm_path": "C:/Users/runxel/gsm-dev"
91+
}
92+
}
9093
```
9194

92-
If you substitute the path with `"default"` you can mimic the standard behavior: the GSM will be built next to the HSF. This is useful if you have set a global path in the package settings. Remember: Project settings override global settings.
95+
If you substitute the path with `"default"` you can mimic the standard behavior: the GSM will be built next to the HSF. This is useful if you have set a global path in the package settings. Remember: **Project settings override global settings**.
9396

9497
Note: There's no path checking implemented at the moment! You have to take care by yourself that you're allowed to write at the paths accordingly.
9598

96-
![Project path setting](https://i.imgur.com/71LeiOW.png)
99+
What to do if you have nested structures? Let's take a look at the structure of this very repo:
100+
101+
```
102+
<Project Root>
103+
├─ .editorconfig
104+
├─ README.md
105+
├─ docs\
106+
└─ Objects\
107+
├─ Object-1\
108+
├─ Object-2\
109+
└─ Object-3\
110+
├─ Object-3\
111+
└─ Object-3.gsm
112+
```
113+
114+
We want to declare a new 'root', a place where we store the HSFs.
115+
All you need to do is to put the following statement into your `.sublime-project` file:
116+
117+
```json
118+
{
119+
"root": "Objects"
120+
// for deeper nesting use slashes: "Objects/deeper"
121+
}
122+
```
123+
124+
<!-- ![Project path setting](https://i.imgur.com/71LeiOW.png) -->
125+
126+
127+
### Syntax Settings Example:
128+
```json
129+
{
130+
"AC_path": "C:/Program Files/GRAPHISOFT/ARCHICAD 23",
131+
"color_scheme": "Packages/GDL/GDL-dark.sublime-color-scheme",
132+
"global_gsm_path": "D:/office/aclibrary"
133+
}
134+
```
97135

98136
<!--
99137
&nbsp;

0 commit comments

Comments
 (0)