Skip to content

Custom Code โ€‹

Appends raw OpenSees commands to the model's deck. It is the escape hatch for anything Alpaca4d does not expose as a component.

๐Ÿ”ง Grasshopper component โ€‹

Custom codeAlpaca4d โ–ธ 10_Utility
Custom Code component
Inputs
AlpacaModelModel(empty)The model to extend. If nothing is connected the component starts an empty deck, so it can also be used to write one from scratch.
CustomCodeTextlistLines of OpenSees Tcl, appended in order.
Outputs
AlpacaModelModelA copy of the model with the extra lines appended.
Pass it on to Run Analysis.
TclTextlistThe whole deck, so you can check where your lines landed.

The input model is not modified โ€” the component works on a copy.

๐Ÿ“ˆ When to use it โ€‹

Use it when

  • You need a material, element or recorder Alpaca4d has no component for.
  • You want an extra recorder writing a specific response to a file.
  • You are prototyping something before it becomes a component.

Do not use it when

  • A component already does it. Custom code is not checked, does not preview, and does not appear in Model View.

Warning

Your lines are appended, so ordering is on you. They land after the model Alpaca4d generated - its nodes, elements, supports and loads - and before the recorders and the analysis commands that Run Analysis adds to it, unless it is set not to use its settings. The tags are Alpaca4d's โ€” a material or element tag you invent may collide with one it assigned. Read the deck with Serialize first and pick tags well above the ones in use.

Nothing here is validated. A mistake surfaces as an OpenSees error in the Run Analysis log, not as a red component.