M
Membre supprimé 203959
Guest
Bonjour,
Je suis débutant dans la programmation en langage VBA sous Excel.
Pourriez-vous m'aider à concevoir le programme ci-dessous, s'il vous plaît.
Merci d'avance pour votre aide.
PS : Impossible d'utiliser le logiciel CATIA V5, CATDMUUtility Batch Process et autres logiciels (visionneuse/conversion) en .exe => Je peux seulement coder en VBA sous Excel
Langage de programmation en VBA sous Excel
Objectif : Extraire l'image .JPEG encapuslée dans une pièce .CATPart (CATIA V5).
STRUCTURE DU PROGRAMME
'Debut
Sub CATPART2JPEG()
1 - Déclaration et initialisation des variables.
Dim truc As Byte, etc...
2 - Ouvrir le fichier CATPart en lecture en mode binaire.
Open ".CATpart" For Binary As #1
'BOUCLE
While Not EOF(#1)
3 - Lire le fichier CATPart
Get #1, Position , Input ?
4 - Enregistrer dans un tableau temporaire le début du JPEG (0xFFD8) jusqu'à la fin du JPEG (0xFFD9)
?
'FIN DE BOUCLE
Wend
5 - Fermer le fichier CATPArt
Close #1
6 - Créer un fichier JPEG avec les valeurs du tableau temporaire
?
'Fin
End sub
Je suis débutant dans la programmation en langage VBA sous Excel.
Pourriez-vous m'aider à concevoir le programme ci-dessous, s'il vous plaît.
Merci d'avance pour votre aide.
PS : Impossible d'utiliser le logiciel CATIA V5, CATDMUUtility Batch Process et autres logiciels (visionneuse/conversion) en .exe => Je peux seulement coder en VBA sous Excel
Langage de programmation en VBA sous Excel
Objectif : Extraire l'image .JPEG encapuslée dans une pièce .CATPart (CATIA V5).
STRUCTURE DU PROGRAMME
'Debut
Sub CATPART2JPEG()
1 - Déclaration et initialisation des variables.
Dim truc As Byte, etc...
2 - Ouvrir le fichier CATPart en lecture en mode binaire.
Open ".CATpart" For Binary As #1
'BOUCLE
While Not EOF(#1)
3 - Lire le fichier CATPart
Get #1, Position , Input ?
4 - Enregistrer dans un tableau temporaire le début du JPEG (0xFFD8) jusqu'à la fin du JPEG (0xFFD9)
?
'FIN DE BOUCLE
Wend
5 - Fermer le fichier CATPArt
Close #1
6 - Créer un fichier JPEG avec les valeurs du tableau temporaire
?
'Fin
End sub