NAME=ug_setpartattrvalue("DB_PART_NAME",nth(2,splitstring(replaceString(ug_askcurrentworkpart(),".prt",""),"_")))
NO=ug_setpartattrvalue("DB_PART_NO",nth(1,splitstring(replaceString(ug_askcurrentworkpart(),".prt",""),"_")))
VERSION=ug_setpartattrvalue("DB_PART_VERSION",nth(3,splitstring(replaceString(ug_askcurrentworkpart(),".prt",""),"_")))
建立这三个表达式,每个表达式中的"DB_PART_NAME","DB_PART_NO","DB_PART_VERSION"对应你的"品名","图号","版本"属性,如有属性不同,修改对应属性名。确保你的文件名命名方式与你图示一致!建立的这三个表达式会提取你文件名赋值给对应的属性,你只需将图框内容导入对应属性即可。