thank you Eric!!
my macro selects a hole then recuperates its diameter! then creates a center point!!
but if l try to work with curve or edge! i can't get the diameter!!!
so, is there another solution?
Hello,
i want to create a macro that change the size of character coasts and arrows of quotation in a Drawing view.
i don't know how to start my essay!! :/
Thank you.
Hi!
I developed a macro that select a hole! then make a point center of that hole!!
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim selection1
Set selection1 = productDocument1.Selection
Dim...
Hi!!!
I'm having some trouble getting update to work the way I'm expecting it to.
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim partDocument1 As Document
Set partDocument1 =...
hello!
I want to create a macro that gets the coordinates of a point (cercle origin), belonging in a part1, in the axis system of a second part (part2)!
TH U
Bonjour!! [ponytails2]
I have a problem with reference of selection!!
MsgBox "select a hole"
Dim InputObjectType(0), Status1
InputObjectType(0)="Hole"
Status1=selection1.SelectElement2(InputObjectType,"Select a hole",false)
If Status1 = "Cancel" Then selection1.Clear: Exit Sub
Dim...
Well i did it partially! the hole is created!
Dim reference11 As Reference
Set reference11 = part1.CreateReferenceFromBRepName("FSur:(Face:(Brp:(Pad.1;2);None:();Cf11:());WithTemporaryBody;WithoutBuildError;WithInitialFeatureSupport;MonoFond;MFBRepVersion_CXR15)", pad1)
Dim hole1 As Hole
Set...
hello everybody!
I tried to create a macro that give me the origin of a selected cercle!
MsgBox "selectionnez un trou"
Dim InputObjectType(0), Status1
InputObjectType(0)="Hole"
Status1=selection1.SelectElement2(InputObjectType,"Select un trou",false)
If Status1 = "Cancel" Then...
Thank you for you help!
at the beginning, my macro hide the tangent plane, iSupport (reference1), then i select the hole, then the plane is displayed, in the end, the hole creation on that iSupport!
I tried with: Set hole1 =part1.AddNewHoleFromPoint (origin(0), origin(1), origin(2)...
I want to create a hole automatically where the user select its place
Sub CATMain()
'**********Declarations*******
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim selection1 As Selection
Set...
Thank you Eric :)
one more thing! how to create a hole in front of that selected one!
Dim reference1 As Reference
Set reference1 = selection1.Item(1).Value
Dim hole1 As Hole
Set hole1 = part1.CreateReferenceFromObject(reference1)
Dim oDiameter As Length
Set oDiameter = oAssemblyHole.Diameter...
hi!
i want to create a macro that select a hole in a product
i developed this macro
MsgBox "selectionnez un trou"
Dim InputObjectType(0), Status1
InputObjectType(0)="Hole"
Status1=selection1.SelectElement2(InputObjectType,"Select un trou",false)
If Status1 = "Cancel" Then selection1.Clear...
I created this macro! that measure distance between a point in part1 and a plane in part2!
but it give a wrong distance compared to the manual one!
Sub CATMain()
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim documents1 As Documents
Set documents1 =...
Hello world
i have an issue, hope you can help me with this
in a CATIAProduct, i want to create a macro that gets the minimal distance between a point and a part!
How can I do that!
thx you
i did get the neme
Set selection1 = productDocument1.Selection
selection1.Add hybridBody2
selection1.PasteSpecial ("CATPrtResultWithOutLink")
Dim reference1 As Reference
Set reference1 = selection1.Item(1).Reference
MsgBox (reference1.Name)
but if i want to change its name
reference1.Name...
one more thing please!
if i want to recuperate the copied point's name : "Point.1"
Set selection1 = productDocument1.Selection
selection1.Add hybridBody2
selection1.PasteSpecial ("CATPrtResultWithOutLink")
msgbox(???)
i tried whith msgbox(selection1.name)
but it gives "CAATIASelection1"...