明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1643|回复: 4

[求助]VBA如何修改线宽?

[复制链接]
发表于 2007-1-30 10:48:00 | 显示全部楼层 |阅读模式

请问在VBA中如何自定义线条宽度呀?

请大家多多帮助一下啊!

发表于 2007-1-30 12:34:00 | 显示全部楼层
说具体点。
发表于 2007-1-30 15:11:00 | 显示全部楼层
object.Lineweight
 楼主| 发表于 2007-1-31 17:05:00 | 显示全部楼层
总是提示不支持这个属性哦
发表于 2007-2-1 08:27:00 | 显示全部楼层

这里有个例子,帮助里面的,

Sub Example_LineWeight()
    ' This example creates a circle in model space and then
    ' finds the current lineweight for the circle. The lineweight
    ' is then changed to a new value.
   
    Dim circleObj As AcadCircle
    Dim centerPoint(0 To 2) As Double
    Dim radius As Double
    
    ' Define the circle
    centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
    radius = 5#
    
    ' Create the Circle object in model space
    Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
    ZoomAll
    
    ' Find the lineweight for the circle
    MsgBox "The current lineweight for the circle is " & circleObj.Lineweight
    
    ' Change the lineweight for the circle
    circleObj.Lineweight = acLnWt211
    circleObj.Update
    MsgBox "The current lineweight for the circle is " & circleObj.Lineweight
End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 18:50 , Processed in 0.158834 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表