哪个大神用下面代码做个插件,可以自定义
Sub CreateArtisticTextInCenter()Dim s As Shape
Dim i As Integer
i = 1
' 遍历选中的形状
For Each s In ActiveSelectionRange
' 获取形状的中心坐标
Dim centerX As Double
Dim centerY As Double
centerX = s.centerX
centerY = s.centerY
' 创建艺术字形状,并设置文本内容为数字
Dim textShape As Shape
Set textShape = ActiveLayer.CreateArtisticText(centerX, centerY, "a" & i & "a", cdrAmericanEnglish, cdrCharSetDefault, "NSimSun", 30, cdrTrue)
'NSimSun为字体
'30为字号
textShape.centerX = s.centerX
textShape.centerY = s.centerY
i = i + 1
Next s
End Sub
可以自己自定义输入前缀,后缀和字体和大小,上面代码是选中图形自动生成序号 GMS插件,自动编号,前后有个a
何先生 发表于 2023-8-23 18:21
GMS插件,自动编号,前后有个a
可以做成那种有窗口,可以修改数据的吗.可以点脚本运行,但无法修改前缀和后缀,得到脚本编辑器里面修改才行
页:
[1]