You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

13
-
14
13
# What is GDL?
15
14
GDL means 'Geometric Description Language'. [ArchiCAD](http://www.graphisoft.com/) uses it to define a library part.
16
15
17
16
Many ArchiCAD users are making their own library parts, sell them or even publish them for free on sites like [BIMComponents](https://bimcomponents.com/), while others just want to modify the provided ones. But they are all tied to the – unfortunately horrible – built-in object editor which is stuck in the 80's or so. It doesn't even have line numbers!
18
17
19
18
But salvation is here!
20
-
The purpose of this package is to give you the chance to comfortably write code in the best editor of the galaxy – [Sublime Text](https://www.sublimetext.com/).
19
+
The purpose of this package is to give you the chance to comfortably write code in[Sublime Text](https://www.sublimetext.com/).
21
20
22
-
This package provides the whole thing: from **syntax highlighting** (with a well aligned **color scheme**) to **auto completion**, **global goto**, **snippets**, and last but not least a **build system** for your scripts.
21
+
This package provides the whole thing: from **syntax highlighting** (with a well aligned **color schemes**) to **auto completion**, **global goto**, **snippets**, and last but not least a **build system** for your scripts.
23
22
24
23
## Installation
25
24
@@ -55,14 +54,19 @@ Copy _one_ of these into the file on the right and save:
55
54
}
56
55
```
57
56
57
+


65
68
69
+
66
70
#### Don't like the themes?
67
71
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.)
68
72
@@ -81,9 +85,11 @@ With the advent of ARCHICAD 23 we don't longer need third-party apps like [GDLnu
81
85
82
86
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.
83
87
84
-
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.
88
+
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. All the files inside the folder you just dragged into Sublime Text will be visible in the sidebar, and can also easily be accessed via the quick open palette.
89
+
For all the possible ways to structure your folders see [below](#structure)
90
+
85
91
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.
86
-
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.
92
+
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> assigned OOTB. Of course these can be adjusted to your taste.
87
93
88
94
### Places
89
95
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](#syntax-settings-example) below) where any GSMs should be deployed to. This is useful if you have a central library already linked in Archicad.
@@ -102,10 +108,21 @@ If you substitute the path with `"default"` you can mimic the standard behavior:
102
108
103
109
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.
104
110
105
-
What to do if you have nested structures? Let's take a look at the structure of this very repo:
111
+
#### Structure
112
+
Let's have a look on how you can organize your folder structure!
113
+
<sub>(Please note: the names are just examples.)</sub>
114
+
115
+
The basic structure looks like this:
116
+
```
117
+
<Project Root Folder>
118
+
├─ example object\.. # <- this is the HSF; the folder with the script parts
119
+
└─ example object.gsm
120
+
```
121
+
Simple, right?
106
122
123
+
But what if you deploy a nested folder structure, like below? In this case you can make use of the 'sub root' feature, which let's you dig into a nested structure (can be arbitrarily deep, but keep in mind you might run in the hard 255 path character limit of Windows).
107
124
```
108
-
<Project Root>
125
+
<Project Root Folder>
109
126
├─ .editorconfig
110
127
├─ README.md
111
128
├─ docs\..
@@ -118,19 +135,26 @@ What to do if you have nested structures? Let's take a look at the structure of
118
135
│ └─ (all scripts)
119
136
└─ Object-3.gsm ## the .gsm share exactly the same name!
120
137
```
121
-
122
-
We want to declare a new 'root', a place where we store the HSFs.
138
+
What you can do is to declare a new 'root'.
123
139
All you need to do is to put the following statement into your `.sublime-project` file:
124
-
125
140
```jsonc
126
141
{
127
142
"root":"Objects"
128
-
// for deeper nesting use slashes: "Objects/deeper"
143
+
// for deeper nesting use forward slashes: "Objects/deeper"
129
144
}
130
145
```
146
+
You could even point to one of the objects directly to circumvent the selection dialog.
@@ -160,12 +184,13 @@ where `<args>` is to be replaced. If you don't need it, you can leave it empty.
160
184
161
185
-->
162
186
163
-
## Getting Started With Sublime Text
187
+
## Getting started with Sublime Text
164
188
New to Sublime? Then I can recommend this excellent and free video tutorial by nettuts: [Perfect Workflow in Sublime Text](http://net.tutsplus.com/articles/news/perfect-workflow-in-sublime-text-free-course/).
165
189
166
190
## Support
167
-
Does this plugin help you in your daily work, or just want to say thanks?
168
-
Please consider donating to sustain working on this plugin.
191
+
Does this plugin help you in your daily work, or you just want to say thanks?
192
+
Countless hours went into the development of GDL-Sublime.
193
+
Please consider donating to sustain working on this plugin!
0 commit comments