AlvaroPers
Mechanical
Hello,
I'm using MS VB to draw a frame in the drawing.
I would like to know the method to set the line color?
Sub Frame()
Set oDrwDoc = CATIA.ActiveDocument
Dim oFact As Factory2D
Set oFact = oView.Factory2D
Dim dW As Double
Dim oLine As Line2D
Dim dH As Double
dW = oDrwDoc.DrawingRoot.ActiveSheet.GetPaperWidth
dH = oDrwDoc.DrawingRoot.ActiveSheet.GetPaperHeight
Set oLine = oFact.CreateLine(10#, 10#, dW - 10#, 10#)
Set oLine = oFact.CreateLine(dW - 10#, 10#, dW - 10#, dH - 10#)
Set oLine = oFact.CreateLine(dW - 10#, dH - 10#, 10#, dH - 10#)
Set oLine = oFact.CreateLine(10#, dH - 10#, 10#, 10#)
End Sub
Please, could someone indicate me how to set the color line?
Thank you
Al.
I'm using MS VB to draw a frame in the drawing.
I would like to know the method to set the line color?
Sub Frame()
Set oDrwDoc = CATIA.ActiveDocument
Dim oFact As Factory2D
Set oFact = oView.Factory2D
Dim dW As Double
Dim oLine As Line2D
Dim dH As Double
dW = oDrwDoc.DrawingRoot.ActiveSheet.GetPaperWidth
dH = oDrwDoc.DrawingRoot.ActiveSheet.GetPaperHeight
Set oLine = oFact.CreateLine(10#, 10#, dW - 10#, 10#)
Set oLine = oFact.CreateLine(dW - 10#, 10#, dW - 10#, dH - 10#)
Set oLine = oFact.CreateLine(dW - 10#, dH - 10#, 10#, dH - 10#)
Set oLine = oFact.CreateLine(10#, dH - 10#, 10#, 10#)
End Sub
Please, could someone indicate me how to set the color line?
Thank you
Al.