Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Custom Electrical Switch

Anonymous
Not applicable
Hello Talkers,

I am looking to create a electrical switch with editable Sub-text. Like the attached image of the "switch 4 way". I want the "4" to actually be an editable value. I also am looking to locate this value in a different location base on the Symbol. This location does not have to be a editable location.

What are the steps to accomplishing this?

Switch.JPG
9 REPLIES 9
Anonymous
Not applicable
I recommend you use GLOB_ID to get the element's ID and use that with the Text2 statement to place the value in the 2D script. This way you can edit the value in the info box and avoid opening the settings dialog.

You can make the location variable by simply using the A and B parameters (which are automatically stretchy) or you can do more fine tuning with a dynamic hotspot (see "Graphical Editing" in the GDL manual - page 131 in my copy).

The script should be pretty easy.
Anonymous
Not applicable
How can I get Two Array value. See Attachment of the Ref Sid-by side.

[1] [2]

I only get [1] array when creating a new object.
Barry Kelly
Moderator
Jay wrote:
How can I get Two Array value. See Attachment of the Ref Sid-by side.

[1] [2]

I only get [1] array when creating a new object.
Click on the little ARRAY symbol to open it and then select the "1" column header and press the INSERT button.
Select the row header to insert more rows if needed also.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Frank Beister
Moderator
In the settings of the array in the parameter list you can add rows and columns to get two dimensions. 2 dimensions is maximum.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
Can the Text in the Text2 Command start in the "Left Justified" location. If the Text changes from say one character to two or three characters the "text" reference location is based on the center. I would like the text to be left justified.
TomWaltz
Participant
Jay wrote:
Can the Text in the Text2 Command start in the "Left Justified" location. If the Text changes from say one character to two or three characters the "text" reference location is based on the center. I would like the text to be left justified.
That's controlled in the STYLE definition. You can anchor the text any way you want, combining top, middle, bottom and left, right, center.
Tom Waltz
Anonymous
Not applicable
Thanks for everyones help.

Here is my simple library part that I will share with the community. (Attached to next message)

The design of this object was a result of desiring the ability to have a Switch that can be modified to address the new California Title 24 Energy standard (2005).

The object uses the element ID as the type of switch (i.e. D for Dimmer and OC for Occupancy Sensor) If ID is left blank, there is no notation as in the case of a "normal" switch.

Within the Parameter settings is where the switch number is found. The default value is blank, but a 3-way or 4-way can be specified if desired.

Hope it helps someone out there........



P.S. - I am very new with GDL, but have owned a copy of The GDL Cookbook 3 for some time now. Being an AC 9 user and with AC 10 coming soon, is there an updated "Cookbook" that I should be looking for?
CSE Switch.JPG
Anonymous
Not applicable
Here is the part
Anonymous
Not applicable
Actually here is an updated Switch part as well as an Outlet part.

The Switch was updated to move the "Switch number" parameter out of the "Display text" pull down for easier access in parameter list. Also the Font size conversion has been changed to better reflect a point to mm conversion. I actually looked all through the Cookbook 3 for a reference to the a_ character but could not find one. I copied the conversion formula from Dan Kunshik's "RoofSlope_accessory_V6.gsm" part.

Cheers