具有相同名称的形状无法粘贴。例如Shape1和Shape1无法粘合。
'Rule 6: Shape should not glue with Shape
Set rule = RuleSet.Rules.Add("BadConnectivity")
rule.Category = "Connectivity"
rule.Description = "Shape should not glue with Shape"
rule.TargetType = visRuleTargetShape
rule.FilterExpression = "OR(HASCATEGORY(""Shape""),STRSAME(LEFT(NAME(750),5),""Shape""))"
rule.TestExpression = "AND(AGGCOUNT(GLUEDSHAPES(1))>0, AGGCOUNT(GLUEDSHAPES(2))>0)"