Is there a way to evaluate INTELLITEXT with pml?

As the title states, is there an object within PML or a pml method to evaluate INTELLITEXT before creating a GLAB? 

I have lots of code creating various GLAB for various anchors. However, if INTELLITEXT evaluates to empty string; Marine Drafting disappears off screen. 

For example, if I am creating GLAB with #NAMN<fr bran> , if someone forgot to name the branch -.- , Marine Drafting will crash during the macro execution / creation of that label. 
So I can't use !myGlab.exbtext to check, because at the moment the GLAB is created, it crashes the entire app. 

Yes, I am well aware I could do something like

if !bran.name.unset() then 
  --replace intellitext with something the drafter will recognize as a problem 
endif

but that would require me writing a separate specific check for every type of label I am creating, which I would rather avoid because there are many of them, and it would be spread all around the code. 

I have created only one method that actually creates the tags for all the variants, and it  would be much simpler and more ellegant if I was able to evaluate the output of intellitext for all labels in that one single method. 

Parents Reply Children
No Data