CATIA / VBA-修改Point属性

时间:2018-10-03 07:27:43

标签: vba catia

我创建了一个宏,可以在CAT绘图中修改气球对象的属性,但是我无法修改Point属性及其线条(请参见下文)

enter image description here 我的代码:

    myBalloon.Text = Right(myBalloon.Text, 3)
    myBalloon.SetFontSize 0, 0, 2.5
    myBalloon.FrameType = 0

我尝试过的解决方案:

  Dim myview As DrawingView

  Set myview = CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView

  Dim mytext As DrawingText

  Set mytext = myview.Texts.Item(1)
  Dim myleader As DrawingLeader

  Set myleader = mytext.Leaders.Item(1)
  myleader.HeadSymbol = 0

这仅适用于1个点,可以修改该Activeview中的其他点 任何人都可以照亮我吗?

1 个答案:

答案 0 :(得分:0)

您可能想要这样的东西:

Dim myview As DrawingView

  Set myview = CATIA.ActiveDocument.Sheets.ActiveSheet.Views.ActiveView

  Dim mytext As DrawingText
  Dim myleader As DrawingLeader


  For Each mytext In myview.Texts

    For Each myleader In dText.Leaders

        myleader.HeadSymbol = 0

    Next

  Next

上面的代码未经测试,但应该是您的开始。