Welcome to 3DCADForums

Join our CAD community forums where over 25,000 users interact to solve day to day problems and share ideas. We encourage you to visit, invite you to participate and look forward to your input and opinions. Acrobat 3D, AutoCAD, Catia, Inventor, IronCAD, Creo, Pro/ENGINEER, Solid Edge, SolidWorks, and others.

Register Log in

Create the (Product+3DShape) couple Catia V6

KABEL

New member
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
 

Sponsors

Forum Sponsors

X
Top