×
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

Creating ".CATMaterial." by using CATIA VB

Creating ".CATMaterial." by using CATIA VB

Creating ".CATMaterial." by using CATIA VB

(OP)
Hi Everyone,
I know that we can open an existing ".CATMaterial" file and edit it like Adding Materials,Material familes using CATIA VB APIs..But Is it possible to create a new ".CATMaterial" file by using CATIA VB?.I need to add Material family,Materials and then also set properties for each material.I tried opening an existing .CATMaterial file ,removing Material familes but it says ".CATMaterial" file should consists atleast one MaterialFamily.This undermines my main objective. Any help will be appreciated.

Thanks

RE: Creating ".CATMaterial." by using CATIA VB

(OP)
I have written the following code.This is creating MaterialFamilies and Materials,but how can I set the names of the Material families and Materials..Plz help me


Dim CATIA As INFITF.Application
CATIA = GetObject(, "CATIA.Application")
If CATIA Is Nothing Then
CATIA = CreateObject("CATIA.Application")
End If

Dim docuemnts As Documents
docuemnts = CATIA.Documents
Dim Materialdocument As Document = docuemnts.Add("CATMaterial")
Dim MaterialDoc As MaterialDocument
MaterialDoc = CType(Materialdocument, Document)
Dim MaterialFamilies As MaterialFamilies = MaterialDoc.Families
Dim MaterialFamily As MaterialFamily = MaterialFamilies.Add()
Dim materials As Materials = MaterialFamily.Materials
Dim material As Material = materials.Add()

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