Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1568 connectés 

  FORUM HardWare.fr
  Graphisme
  Infographie 3D

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

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

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

n°1184163
h_kabel
Posté le 08-01-2019 à 09:26:02  profilanswer
 

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 :
  1. Sub CATMain ()
  2. '-----create a product
  3. dim oNewService As PLMNewService2
  4. set oNewService = CATIA.GetSessionService("PLMNewService2" )
  5. Dim oEditor As Editor
  6. oNewService.PLMCreate "VPMReference",oEditor
  7. '------for the next line i want to add a 3DShape to this product I've created
  8. oNewService.PLMCreate "3DShape",oEditor 'the 3dshape is created alone in a new window
  9. 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 :
  1. Sub CATMain ()
  2. dim documents1 As Documents
  3. set documents1=CATIA.Documents
  4. dim productdocument1 As ProductDocument
  5. set productdocument1=documents1.Add("Product" )
  6. dim products1 As Products
  7. set products1=productdocument1.Products
  8. dim product2 as product
  9. set product2=products1.AddNewComponent("Part","" )
  10. End Sub


 
Any hint is really appreciated!
 
Regards

mood
Publicité
Posté le 08-01-2019 à 09:26:02  profilanswer
 

n°1184164
h_kabel
Posté le 08-01-2019 à 10:25:22  profilanswer
 

Can someone please help me out?


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Graphisme
  Infographie 3D

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

 

Sujets relatifs
Taraudage filetage dans CATIAMessage d'erreur projection 3D sur Catia
Macro CATIA fonction replace et reorder pour des bodyCATIA V5 # Exporter des valeurs de paramètres dans Excel
Problème catia RDMimpossible de cliquer sur "surcharge des propriétés" sur Catia
Importer proprietes parts d'un fichier excel vers un assemblage catiaUtilisation de macro sous CATIA V5
CATIA Perte de traits d'esquisse au passage 3DPerte des trais d'esquisse au passage 3D sur CATIA V5
Plus de sujets relatifs à : Create the (Product+3DShape) couple Catia V6 VBA


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR