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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to add arrow in Cat drawing (Change thickness)

Status
Not open for further replies.

FabienF

New member
Joined
Jul 5, 2017
Messages
19
Location
FR
Hello,

I am new to automation in Catia and I need help . I need to automatically generate drawings containing arrows. So far everything works fine except for thethickness of the arrows.

I have used

Set MyArrow1 = MyDrawingViews.ActiveView.Arrows.Add(X1 coord, Y1 coord, X2 coord, Y2 coord)

to create the arrow, but I need to increase its thickness.

Can someone help me with the command to use to change the thickness of an arrow in a catdrawing? After many researches on the Internet I cannot find a way.

Thanking you in advance.
 
Don't now if it will work, but try this:

Code:
  selection1.Add (MyArrow1 )
    CATIA.ActiveDocument.Selection.VisProperties.SetRealWidth 2, 1
    CATIA.ActiveDocument.Selection.Clear

Number 2 is the number of the item of the thickness.

Tiago Figueiredo
Tooling Engineer

Youtube channel:
 
Thank you Tiago. It works with this code:


Set MyArrow1 = MyDrawingViews.ActiveView.Arrows.Add(x1,y1,x2,y2)
CATIA.ActiveDocument.Selection.Add MyArrow1
CATIA.ActiveDocument.Selection.VisProperties.SetRealWidth 2, 1
CATIA.ActiveDocument.Selection.Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top