Add and Delete custom properties in SW2018SP4

Hi Guys,

I have visual basic code that i used to add and delete custom properties to a part in Solidworks. It worked fine in SW2017SP3 but now doesn't work in 2018SP4.

Here is the method i was using to Delete

retval = Part.DeleteCustomInfo("TextBox2")

To Add

retval = Part.AddCustomInfo("TextBox2", "Text", TextBox2.Text)

I don't know if there is something else i need to be uisng in SW2018SP4

Any help is appreciated.

Thanks

SolidworksApi/macros