Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line color in the Drawing frame (CATIA) 1

Status
Not open for further replies.

AlvaroPers

Mechanical
Nov 29, 2020
30
AR
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.
 
Replies continue below

Recommended for you

Set visprop = Sel1.VisProperties
visprop.SetRealColor R, G, B, 0 '4th variable is either 0 or 1 for inheritence
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top