Creating Parameters Directly under a GeoSet
Creating Parameters Directly under a GeoSet
(OP)
I have a script that creates String Parameters, and then I have to Cut-And-Paste each one into the appropriate GeoSet that holds fastener points of a variety indicated by the Parameter String. Is there a way to create the parameter directly into the GeoSet without the need for the Cut-And-Paste?
This 'Parameter in the GeoSet' is the format that is used by a piece of Riveting software.
This 'Parameter in the GeoSet' is the format that is used by a piece of Riveting software.





RE: Creating Parameters Directly under a GeoSet
It can be done also in script...
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Creating Parameters Directly under a GeoSet
CODE --> catscript
Language="VBSCRIPT" Sub CATMain() Dim partDocument1 As Document Set partDocument1 = CATIA.ActiveDocument Dim part1 As Part Set part1 = partDocument1.Part Dim hybridBodies1 As HybridBodies Set hybridBodies1 = part1.HybridBodies Dim hybridBody1 As HybridBody Set hybridBody1 = hybridBodies1.Add() hybridBody1.Name = "GENERAL NOTES" Dim parameters1 As Parameters Set parameters1 = part1.Parameters Dim strParam1 As StrParam Set strParam1 = parameters1.CreateString("", "") strParam1.Rename "GENERAL TOLERANCES" strParam1.Value = "ASNA2110" part1.Update Set partDocument1 = CATIA.ActiveDocument Dim selection1 As Selection Set selection1 = partDocument1.Selection selection1.Clear selection1.Add strParam1 selection1.Cut Set partDocument1 = CATIA.ActiveDocument Dim selection2 As Selection Set selection2 = partDocument1.Selection selection2.Clear selection2.Add hybridBody1 selection2.Paste Set partDocument1 = CATIA.ActiveDocument Dim selection3 As Selection Set selection3 = partDocument1.Selection selection3.Clear Dim parameters2 As Parameters Set parameters2 = part1.Parameters Dim parameterSet1 As ParameterSet Set parameterSet1 = parameters2.RootParameterSet selection3.Add parameterSet1 selection3.Delete End SubRE: Creating Parameters Directly under a GeoSet
RE: Creating Parameters Directly under a GeoSet