×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Set dashed line in drawing vba catia

Set dashed line in drawing vba catia

Set dashed line in drawing vba catia

(OP)
Hello,

I can not find how to adjust dashed line in drafting for catia. Below is some code for Linetype, but result is still filled line.

How to define a thin dashed line in vba code?



Set Line11 = Fact.CreateLine(22.5, 9.25, 192.5, 9.25)
Line11.Name = "Line11"
CATIA.ActiveDocument.Selection.Add Line11
Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.SetRealLineType 4, 0.2
Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.SetRealWidth 2, 0.2


Thank you for any suggestions,

RE: Set dashed line in drawing vba catia

Can you try on a test drawing this?

CODE --> CATScript

Language="VBSCRIPT"

Sub CATMain()

Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument


'-------------- select generated items

Dim selection4 As Selection
Set selection4 = drawingDocument1.Selection

selection4.Search "CATDrwSearch.CATEarlyGenItem,all"

Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.SetRealLineType 1,0.2 '-----------change line type

Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.SetRealWidth 1,0.2 '-----------change width


End Sub 

Regards
Fernando

https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources