here's my code (yes it is written by Claude):
// ================================================================
// Set array column offset (spacing between array elements)
// ================================================================
private static void SetArrayColumnOffset(BlockReference blockRef, Transaction tr,
string paramName, double offset)
{
try
{
var blockDef = (BlockTableRecord)tr.GetObject(blockRef.DynamicBlockTableRecord, OpenMode.ForRead);
var extDict = blockDef.ExtensionDictionary;
if (extDict.IsNull) return;
var extDictObj = (DBDictionary)tr.GetObject(extDict, OpenMode.ForRead);
if (!extDictObj.Contains("ACAD_ENHANCEDBLOCK")) return;
var enhancedBlockId = extDictObj.GetAt("ACAD_ENHANCEDBLOCK");
var enhancedBlock = (DBObject)tr.GetObject(enhancedBlockId, OpenMode.ForRead);
var enhancedDict = enhancedBlock.ExtensionDictionary;
if (enhancedDict.IsNull) return;
var enhancedDictObj = (DBDictionary)tr.GetObject(enhancedDict, OpenMode.ForRead);
if (!enhancedDictObj.Contains("ACAD_BLOCKACTIONPARAM")) return;
var blockActionParamId = enhancedDictObj.GetAt("ACAD_BLOCKACTIONPARAM");
var blockActionParamDict = (DBDictionary)tr.GetObject(blockActionParamId, OpenMode.ForRead);
foreach (var entry in blockActionParamDict)
{
var actionId = entry.Value;
var action = tr.GetObject(actionId, OpenMode.ForRead) as DBObject;
if (action == null) continue;
// Try to find matching array action by iterating through properties
var actionType = action.GetType();
var nameProperty = actionType.GetProperty("Name",
System.Reflection.BindingFlags.IgnoreCase | System.Reflection.BindingFlags.Public);
if (nameProperty == null) continue;
var actionName = nameProperty.GetValue(action) as string;
if (string.Equals(actionName, paramName, StringComparison.OrdinalIgnoreCase))
{
// Found matching action — attempt to set ColumnOffset
var offsetProperty = actionType.GetProperty("ColumnOffset",
System.Reflection.BindingFlags.IgnoreCase | System.Reflection.BindingFlags.Public);
if (offsetProperty != null && offsetProperty.CanWrite)
{
action.UpgradeOpen();
offsetProperty.SetValue(action, offset);
return;
}
}
}
}
catch
{
// Silently fail — column offset modification is not critical
}
}
and here's how it is called:
SetArrayColumnOffset(blockRef, tr, "main_axles", ws);
SetArrayColumnOffset(blockRef, tr, "j_axles", wsJ);
SetArrayColumnOffset(blockRef, tr, "st_axles", wsSt);
Since it's written by Claude, I honestly don't know much of how it works. I'm a beginner in C# but don't know anything about integration with AutoCAD.
Here's a screenshot of what I need edited by this code:

Worst case I can just make it a manual edit with instructions for the user, as you are able to just edit it from the properties menu in the screenshot. But obviously if there's a way to do it with code, I'd like to include it in my trailer configurator program.