appvid
Automotive
- Nov 9, 2012
- 81
Hello
I wrote this script that mirros all features in all geometric sets. Now I want to add Make datum, No keep mode to this.
thank you...
regards-appvid
I wrote this script that mirros all features in all geometric sets. Now I want to add Make datum, No keep mode to this.
Code:
Sub CATMain()
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim hybridBodies1 As HybridBodies
Set hybridBodies1 = part1.HybridBodies
Dim hybridShapeFactory1 As HybridShapeFactory
Set hybridShapeFactory1 = part1.HybridShapeFactory
Dim hybridBody1 As HybridBody
Dim originElements1 As OriginElements
Set originElements1 = part1.OriginElements
Dim hybridShapePlaneExplicit1 As HybridShapePlaneExplicit
Set hybridShapePlaneExplicit1 = originElements1.PlaneZX
Dim referenceplane As Reference
Set referenceplane = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Dim i, j As Integer '========================================================================
For i = 1 To hybridBodies1.Count
Set hybridBody1 = hybridBodies1.Item(i)
Dim HybridShapes1 As HybridShapes
Dim HybridShape1 As HybridShape
For j = 1 To hybridBody1.HybridShapes.Count
Set HybridShapes1 = hybridBody1.HybridShapes
Set HybridShape1 = HybridShapes1.Item(j)
MsgBox HybridShape1.Name
Dim reference1 As Reference
Set reference1 = part1.CreateReferenceFromObject(HybridShape1)
Dim hybridShapeSymmetry1 As HybridShapeSymmetry
Set hybridShapeSymmetry1 = hybridShapeFactory1.AddNewSymmetry(reference1, referenceplane)
hybridBody1.AppendHybridShape hybridShapeSymmetry1
" [COLOR=#CC0000][b]here I WANT TO ADD CODE THAT MAKES DATUM AND NO KEEP MODE" --- Are there any techniques[/b][/color]
Next
Next
part1.UpdateObject hybridBody1
thank you...
regards-appvid