×
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

Macro to Instantiate 2d component.

Macro to Instantiate 2d component.

Macro to Instantiate 2d component.

(OP)
hello,

i'm workingon a title block macro for my company. We have the company grafic recreated as cad data and i would like to instantiate taht with the macro and place it in the title block. Is there a way to do this or am i going to have to create each of the lines individually? (i would like to avoid this as there are several thousand line segments that create the logo as well as multiple fills of different colors)

Any help would be greatly appreciated.

RE: Macro to Instantiate 2d component.

online doc is usually a good place to search...

here is my code

CODE --> VBA

Sub insertFirstDittoInActiveView()
Dim myDrawing As DrawingDocument
Set myDrawing = CATIA.ActiveDocument

Dim myDitto As DrawingView
Set myDitto = myDrawing.Sheets.Item(2).Views.Item(3)   'sheet2 is the details sheet here. item 3 is the first ditto

Dim myDittoInstance As DrawingComponent
Set myDittoInstance = myDrawing.Sheets.ActiveSheet.Views.ActiveView.Components.Add(myDitto, 100, 100)

End Sub 

Eric N.
indocti discant et ament meminisse periti

RE: Macro to Instantiate 2d component.

(OP)
can you give me the link to the online help doc please?

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