Field must have an entry

I have a SW form with a field that must have an entry.

How do I ensure that this happens and that the form cannot be closed if the field is blank?

SolidworksApi macros
Answers 2
DG
DG 2012-03-14 Best Answer

You can put an IF condition with that field value. If field has a value then do nothing and if field is blank, then a pop up message saying "Fill the Field"

KR
KR 2012-03-14

Peter,

By "SW form" do you mean a PropertyManager page or a VB form?  The former looks like it is native to the SW environment, the latter looks like any normal gray Windows form.  Anyway, depending on which it is the answer will be different.

Also, what exactly do you mean by "closed"?  Do you mean they are exiting the macro/add-in?  How exactly are the exiting it?

Keith

Online Training for SolidWorks API