lklo
Industrial
- Nov 24, 2010
- 226
Hi
I´m writing on a little script , that will help me get quicker starting on a new EDM electrode part.
I use the the "Create New Parent" to create an assembly,
and the Electrode part will be the top part - and the core and cavity plate is the component.
I have made som VB tricks to automate the new name of the Electrode part. Everything works fine - but I have one problem.
In the new part I want to make a Linked Body of the component´s solid body (core or cavity plate).
In the recorded journal I have edited the "COMPONENT CavityPlatePart 1" so it is a variable of the component name.
That works 100%.
recorded journal :
>> Dim component1 As Assemblies.Component = CType(workPart.ComponentAssembly.RootComponent.FindObject("COMPONENT CavityPlatePart 1"), Assemblies.Component) <<
But, and here comes the problem.
recorded journal :
>> Dim body1 As Body = CType(component1.FindObject("PROTO#.Bodies|EXTRUDE(1)"), Body) <<
I can´t get a solution to create a variable of the component´s Solid Body name, so I can replace the EXTRUDE(1) in ("PROTO#.Bodies|EXTRUDE(1)"), with a variable.
Maybe someone here can the trick ?
lklo
I´m writing on a little script , that will help me get quicker starting on a new EDM electrode part.
I use the the "Create New Parent" to create an assembly,
and the Electrode part will be the top part - and the core and cavity plate is the component.
I have made som VB tricks to automate the new name of the Electrode part. Everything works fine - but I have one problem.
In the new part I want to make a Linked Body of the component´s solid body (core or cavity plate).
In the recorded journal I have edited the "COMPONENT CavityPlatePart 1" so it is a variable of the component name.
That works 100%.
recorded journal :
>> Dim component1 As Assemblies.Component = CType(workPart.ComponentAssembly.RootComponent.FindObject("COMPONENT CavityPlatePart 1"), Assemblies.Component) <<
But, and here comes the problem.
recorded journal :
>> Dim body1 As Body = CType(component1.FindObject("PROTO#.Bodies|EXTRUDE(1)"), Body) <<
I can´t get a solution to create a variable of the component´s Solid Body name, so I can replace the EXTRUDE(1) in ("PROTO#.Bodies|EXTRUDE(1)"), with a variable.
Maybe someone here can the trick ?
lklo