Option Explicit Call Main() Sub Main() ' Local variables Dim unitsPerMeter, dblUnits, intUnitSystem, strTitle, customUnitName ' Get new custom unit name or use generic naming on esc customUnitName = Rhino.GetString("Enter custom unit name? ") If IsNull(customUnitName) Or customUnitName = "" Then customUnitName = "Custom Units" ' here is where no text gets written if the user right mouse clicks End If ' Set the properties of Real Box strTitle = "Set Custom Unit Size" unitsPerMeter = Rhino.RealBox("Enter " & customUnitName & " per meter",, strTitle, 0) ' sets custom units If Not IsNull(unitsPerMeter) Then intUnitSystem = Rhino.UnitCustomUnitSystem(unitsPerMeter, True, customUnitName) End If End Sub