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 tryed 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