×
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

Current Date

Current Date

Current Date

(OP)
Hi All,

I am struggling with three problems. I am writing the script for catia part modeling.

1. How can i assign strParam1 the current material
2. How can i assign strParam2 the current mass
3. How can i assign strParam6 the current date of the system

The program is below:

Sub CATMain()

Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument

Dim product1 As Product
Set product1 = productDocument1.Product

Dim parameters1 As Parameters
Set parameters1 = product1.UserRefProperties

Dim strParam1 As StrParam
Set strParam1 = parameters1.CreateString("Material", "")
strparam1.valuatefromstring ""

Set strParam2 = parameters1.CreateString("Mass", "")
strparam2.valuatefromstring ""

Set strParam3 = parameters1.CreateString("Drawn by", "")
strparam3.valuatefromstring ""

Set strParam4 = parameters1.CreateString("Checked by", "")
strparam4.valuatefromstring ""

Set strParam5 = parameters1.CreateString("Approved by", "")
strparam5.valuatefromstring ""

Set strParam6 = parameters1.CreateString("Drawn Date", "")
strparam6.valuatefromstring ""

strParam1.value=
strParam2.value=
strparam6.value= ""

End



What i want is that these parameters should pick up the data automatically, not filling them manually.

Your help is of high importance to me.

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