wensent 发表于 2004-6-4 17:25:00

新手紧急求教3 !!!!!!!!!!!!!

我新建了一个图层,线形为CENTER,随意画一条线。可是运行以下程序后,线形还是直线,请问该怎样解决????????


Private Sub Command1_Click()


Dim acdApp As New AcadApplication<BR>                       acdApp.Visible = True<BR>Set ThisDrawing = acdApp.ActiveDocument


Dim layerObj As AcadLayer<BR>Set layerObj = ThisDrawing.Layers.Add("ABC")<BR>layerObj.Color = acRed


Dim linetypeName As String<BR>linetypeName = "CENTER"<BR>ThisDrawing.Linetypes.Load linetypeName, "acad.lin"


<BR>Dim newlayer As AcadLayer<BR>Set newlayer = ThisDrawing.Layers.Add("ABC")<BR>ThisDrawing.ActiveLayer = newlayer



<BR>Dim startPoint(0 To 2) As Double, endPoint(0 To 2) As Double<BR>Dim LineObj As AcadLine<BR>startPoint(0) = 100: startPoint(1) = 150: startPoint(2) = 0<BR>endPoint(0) = 300: endPoint(1) = 500: endPoint(2) = 0


Set LineObj = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint)


<BR>End Sub<BR>请问该怎样画出红色的CENTER线形的线??????????


急,在线等!!!!!!!!

wensent 发表于 2004-6-4 17:39:00

急啊!!!!!!!

gzy 发表于 2004-6-4 17:40:00

可能是你线型比例(LinetypeScale)没有搞合适导致看不出来。

wensent 发表于 2004-6-4 17:47:00

和线形比例有关吗???我要的只是默认线形即可!!!!

mccad 发表于 2004-6-4 19:36:00

两个 问题:<BR>1.你加载了线型,但没有为新建的图层使用你加载的线型,所以显示不出来。<BR>2.同一图层名称为什么要新建两次。其实一次就够了。
页: [1]
查看完整版本: 新手紧急求教3 !!!!!!!!!!!!!