Skip to main content

ModelCenter APIs 2025 R2

setAssemblyStyle

Last update: 16.07.2025

abstract fun setAssemblyStyle(assemblyName: String, style: ModelCenter.AssemblyStyle)

Set the visual style of an assembly. This method can be used to modify any control with children, including IF blocks, traditional assemblies, drivers (in process mode), sequences, and parallel blocks.

Parameters

assemblyName the full name of the assembly to modify
style the style

abstract fun setAssemblyStyle(assemblyName: String, style: ModelCenter.AssemblyStyle, width: Int, height: Int)

Set the visual style of an assembly including (optionally) width and height. Style constants are defined above and in ModelCenter.odl in the ModelCenter project.

Width and height are ignored for the model, elements to be collapsed, and for assemblies which are not data-driven.

This method can be used to modify any control with children, including IF blocks, traditional assemblies, drivers (in process mode), sequences, and parallel blocks.

Parameters

assemblyName the full name of the assembly to modify
style the style
width the new width; ignored when = 0
height the new height; ignored when = 0

Connect with Ansys