推荐答案使用"IsValid()"方法可以测试任何脚本对象的"NULL".这似乎很奇怪(NULL如何具有方法?),但这是它的工作原理.Testing for "NULL" of any script object is done with the "IsValid()" method. This may seem odd (how can NULL have a method?) but it's how it works.所以你有 image img-> img.ImageIsValid() imageDocument doc-> doc.ImageDocumentIsValid() ROI r-> r.ROIIsValid() TagGroup tg-> tg.TagGroupIsValid()等等还:object ob-> ob.ScriptObjectIsValid()image img --> img.ImageIsValid()imageDocument doc --> doc.ImageDocumentIsValid()ROI r --> r.ROIIsValid()TagGroup tg --> tg.TagGroupIsValid()etc. etc.also: object ob --> ob.ScriptObjectIsValid()但是,针对您的问题的更简单解决方案是使用:But a simpler solution for your problem is to use:TagGroup child_tg;if ( tg.TagGroupGetIndexedTagAsTagGroup(i, child_tg) ) showTags(child_tg); Get...命令返回一个布尔值,指示操作成功或失败.The Get... commands return a Boolean indicating success or failure of the operation. 这篇关于DM脚本:提取变量/未知结构的TagGroup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
05-30 20:10