Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2019
    Posts
    1

    Default Create the (Product+3DShape) couple Catia V6

    Hello everyone,
    I've been spending days trying to figure out how to create a Product then place in a 3DShape inside this product created, I tried this code below:

    Code:
    Sub CATMain ()
    '-----create a product 
    dim oNewService As PLMNewService2
    set oNewService = CATIA.GetSessionService("PLMNewService2")
    Dim oEditor As Editor 
    oNewService.PLMCreate "VPMReference",oEditor
    
    '------for the next line i want to add a 3DShape to this product I've created 
    oNewService.PLMCreate "3DShape",oEditor  'the 3dshape is created alone in a new window  
    End Sub
    as you can see in the code above, I have problem adding a 3DShape to the product ,
    for more details , in V5 I can do that using the code below :

    Code:
    Sub CATMain ()
    dim documents1 As Documents 
    set documents1=CATIA.Documents
    dim productdocument1 As ProductDocument
    set productdocument1=documents1.Add("Product")
    dim products1 As Products
    set products1=productdocument1.Products
    dim product2 as product
    set product2=products1.AddNewComponent("Part","")
    End Sub
    Any hint is really appreciated!
    Regards

    •   AltAdvertisment

        

  2. #2
    Join Date
    Jul 2006
    Posts
    1,666

    Default

    If anyone is interested in following this topic, KABEL also posted his question on the Eng-Tips forum. He has gotten several replies with help there

    https://www.eng-tips.com/viewthread.cfm?qid=447896

Tags for this Thread

 

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •