Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep 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
Joined
Nov 29, 2020
Messages
30
Location
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.
 
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