Modeling
About Archicad's design tools, element connections, modeling concepts, etc.

Pen chart object?

SeaGeoff
Ace
Hi,
I'm imagining a utility object that will automatically build a pen chart in the floor plan window with a user defined array of squares and accompanying text label for each pen. It would be a great help when introducing new coworkers to our pen standards. Any of you GDL master have anything like this you'd be willing to share?
Regards,
Geoff Briggs
I & I Design, Seattle, USA
AC7-28, M1 Mac, OS 15.x
Graphisoft Insider's Panel, Beta Tester
5 REPLIES 5
Karl Ottenstein
Moderator
I just found something close on objectsonline that is close, Geoff. (Searching there is a b**ch, as quotes, "and", and "or" mean nothing ... but found it in the 'utilities' group.)

Swatchmaker:
http://www.objectsonline.com/arc/Detail.tpl?DB_Title=Swatch%20Maker&DB_SKU=A00613

Not quite what you want, as it doesn't display pen weights, and seems spendy for just displaying colors. Actually, scanning the GDL manual, it doesn't appear that GDL can retrieve pen weights, only their RGB color values, so your wish might have to be done by an add-on using the API.

If just a list is OK, then SQL should be able to do the trick...I'll try that and post back.

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
SeaGeoff
Ace
Karl wrote:
If just a list is OK, then SQL should be able to do the trick...
You can get a list straight from Attribute Manager, but that's not much use in explaining the logic of a pen set-up. I was definitely thinking of something graphical. I started doing it manually, with fills and attached labels, typing the pen number inot the ID field one at a time. Not a big deal, but it would be so cool if the whole thing was automatic.

It is a shame that GDL can't return pen weights, and that should be remedied.

Thanks for the tip about Swatchmaker, and thanks for you seemingly endless capacity to help gomers like me.
Regards,
Geoff Briggs
I & I Design, Seattle, USA
AC7-28, M1 Mac, OS 15.x
Graphisoft Insider's Panel, Beta Tester
Karl Ottenstein
Moderator
Dwight's suggestion is perfect if pen weights are not required (or if they are fixed by standard, and you don't mind typing them in ... I don't like having things like that 'static' anymore than I like unlinked model data).

Here's a way to get the info using the SQL option in the Calculate menu. If you do not see SQL in Calc, then go to Preferences, Imaging & Calc to set Calc Menu appearance to "Full with SQL".

Enter the simple query "select * from pens", and the result will appear in your browser similar to the screenshot below...

[continued in next post]

Karl

PS Ah, you're right Geoff. This might be overkill, since saving from Attribute Manager gives the same information ... as well as an indication of which pens are 'in use'. That text file can also be opened in Excel (next post).
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Karl Ottenstein
Moderator
[part 2 of 3]

You can copy and paste the result data directly into Excel - info will go directly into columns properly as shown in the attached screenshot.

The attached shows the result of a small VBA routine - the final post will include the actual spreadsheet with this button and function - that colors the cells with the actual RBG of the associated pen.

One could write slightly more complicated VBA that instead produces an ordered, labeled, colored pen table from the data in a new sheet.

I prefer this SQL/Excel solution since it guarantees that the data exactly matches what is in the actual pen table in ArchiCAD ... no opportunity to screw up the weights. (A better-integrated solution, actually, is to do it in Access with the PLN ODBC driver ... then the Access can directly query the PLN and produce the colored table without additional intervention. Only works on Windows though.)

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Karl Ottenstein
Moderator
[part 3 of 3]

Finally, attached is the Excel spreadsheet that includes the coloring function. Just paste your SQL output into the sheet, being sure to copy the title row and to paste into cell A1. Then click the button to color things.

The code for the colorizing is:
    nRow = 2 ' skip heading row
    While Cells(nRow, 1).Value <> ""
        Range(Cells(nRow, 2), Cells(nRow, 4)).Select
        Selection.Interior.Color = _
            RGB(Cells(nRow, 2), Cells(nRow, 3), Cells(nRow, 4))
        nRow = nRow + 1
    Wend
    Cells(1, 1).Select ' jump back to top of sheet

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB