×
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

Catia VBA macro programming. Export PRT properties to drawing file. Creating template

Catia VBA macro programming. Export PRT properties to drawing file. Creating template

Catia VBA macro programming. Export PRT properties to drawing file. Creating template

(OP)
HEllo!

I am a bit new at this site, but I have read a lot of forums here. I have learnt a lot!!! Thank you!

I have a problem what I couldnt fix.
I am using Catia, and trying to create a macro, creating me a template. I am using VBA!
My problem is that i cannot create a link between the text and the parts property. I mean eg.: drawing number, designer, date etc...
Can somebody help me to fix this problem? Now I can open the drawn template, and there are the texts which should be connected to the part/product.
I tried making attribute unsuccesfully..
Help me please!

here is my code:

----------------------------------------------------------------------------------------------
Option Explicit

' Purpose: Creating a template
' Assumptions: Looks for 1.CATDrawing in the DocView
' Author: johndoe
' Languages: VBScript
' Locales: English



Sub CATMain()

' Open the Drawing document
'("C:\Users\johndoe\Desktop\catia\visualbasicad\1.CATDrawing") should be replaced to the right directory

Dim oDoc As Document
Set oDoc = CATIA.Documents.Open("C:\Users\johndoe\Desktop\catia\visualbasicad\1.CATDrawing")

' ------------
' Get the sheets collection of the drawing
' ------------
Dim oDrawingSheets As DrawingSheets
Set oDrawingSheets = oDoc.Sheets

' ------------
' Add the created sheet
' ------------

Dim oDrawingSheet As DrawingSheet
Set oDrawingSheet = oDrawingSheets.Item("Sheet.1")

' ------------
' Activate the sheet
' ------------

oDrawingSheet.Activate



End Sub
----------------------------------------------------------------------------------------

RE: Catia VBA macro programming. Export PRT properties to drawing file. Creating template

First create the parameters in part/product. then link the drawing texts with those params

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