【问题标题】:How to hide visio shape group in stencil如何在模具中隐藏 visio 形状组
【发布时间】:2012-12-13 10:02:02
【问题描述】:

我有一个复杂的模板,有许多小形状(sheet.6 到 43),分组为一组(sheet.44)。里面还有分组。

我想使用 shapesheet 公式隐藏此组以使用用户属性。

我会设置一个简单的形状: Geometry1.NoShow=sheet.44!user.isHidden Miscellaneous.HideText=sheet.44!user.isHidden

但是如何让它在所有子形状中继承呢?用 vba 吗?

用答案编辑:

感谢 Jon 确认除了 VBA 没有其他方法。 这是我的 VBA 代码,适用于所有遇到同样问题的人。

Call makeithidden("Sheet.164!Geometry1.NoShow", myshape)


Sub makeithidden(formula As String, ByVal myshape As Shape)
    For Each subShape In myshape.Shapes
        subShape.Cells("geometry1.noShow").FormulaForceU = formula
        subShape.Cells("HideText").FormulaForceU = formula
        Call makeithidden(formula, subShape)
    Next subShape
End Sub

再见!

【问题讨论】:

    标签: shape visio stencils shapesheet


    【解决方案1】:

    您的 VBA 代码必须循环遍历所有子形状并设置该公式,只要该组获得新形状。公式的格式就像你的例子一样,所以做起来不会太难:

    SubShp.CellsSRC(visSectionFirstComponent,0,2).FormulaU = "Sheet." & Cstr(ParShp.ID) & "!Geometry1.NoShow"
    

    或类似的东西,在 ParShp.Shapes 中的每个 SubShp 的循环中...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-05-19
      • 2018-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多