Skip to content

Commit 74deadb

Browse files
authored
Merge pull request #337 from cwapi3d/bugfix/better_docstrings_for_prints_uc
Improved docstrings for utility controller prints
2 parents 9fd8e27 + 3d5041e commit 74deadb

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "cwapi3d"
3-
version = "32.443.3"
3+
version = "32.443.4"
44
authors = [{ name = "Cadwork", email = "it@cadwork.ca" }]
55
requires-python = ">= 3.12"
66
description = 'Python bindings for CwAPI3D'

src/utility_controller/__init__.pyi

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ def set_project_data(project_data_id: str, data: str) -> None:
3838

3939

4040
def print_error(message: str) -> None:
41-
"""Prints an error.
41+
"""Prints an error to the bottom toolbar of Cadwork 3d.
42+
43+
Notes:
44+
Attention, this function is blocking. User will need to click to
45+
continue the process.
4246
4347
Parameters:
4448
message: The error message.
@@ -54,7 +58,12 @@ def get_language() -> str:
5458

5559

5660
def print_message(message: str, row: int, column: int) -> None:
57-
"""Prints a message.
61+
"""Prints a message that will be visualized in the bottom toolbar of the
62+
3D view. You can arrange the message in the desired position by specifying the row and column.
63+
64+
Examples:
65+
>>> import utility_controller as uc
66+
>>> uc.print_message("Hello World!", 1, 1)
5867
5968
Parameters:
6069
message: The message to print.
@@ -297,7 +306,7 @@ def create_new_guid() -> str:
297306

298307

299308
def print_to_console(message: str) -> None:
300-
"""Prints a message to the console.
309+
"""Prints a message to the Cadwork debug console.
301310
302311
Parameters:
303312
message: The message.

0 commit comments

Comments
 (0)