The clue is probably how you defined this attribute with default value.
It it correct that you didn't define that in code, but in your model, as an attribute of the DMScripts class?
In that case this.SomeData is definitely not going to work. There is little to no magic involved when it comes to EA.
If you want to access the attributes of the element on which the script is defined, then you'll have to do that yourself.
What you can do is (in VBScript)
dim x
dim dmScriptsClass
set dmScriptsClass = Repository.GetElementByGUID(<guid of the DMScripts class>)
for each attr in dmScriptsClass
if attr.Name = "SomeData" then
x = attr.Default
exit for
end if
next
Geert
Thanks, I'm happy to use the Repository API to get this.

I defined it as an attribute on the DMSCript class in the DataMiner diagram. I'm not sure I would even know how to define an attribute in the code of the DMScript class.
You are correct that this is JavaScript, as I haven't used VBScript for a long time, but used to using the API for creating & managing elements.
I'm sure that using this to get attributes of a runtime class works with the in-built Add-In model but may be wrong.
Any other suggestions warmly welcomed.