I use the some Catia, maybe there are some differences because of Service Pack, Hotfix or Build Number?
I have Service Pack 3, Build Number 26, Hotfix 42.
Thank you HarunMusic for great macro!!!
I have removed lines 36 and 38, otherwise it doesn't remove any element(I think because already selected publications have just ordinary name not "" like condition in if ).
Without these lines works perfectly!
Thanks a lot!
Thanks for your answer LWolf!
Unfortunatelly my knowledge of catia scripting is not enough to implement your solution into my code.
Could you help me?
My code below:
Sub CATMain()
Dim foundPublications() As Publication
Dim iNbPublications ' As Integer
Dim iPublication ' As Integer...
Hello every one,
It happend many times that I receive Catpruducts where somebody has deleted published element but didn't remove linked publication.
And of course Catia shows it as broken publication and I got problem with some checks.
I want to find and remove automatically broken publication...
sub catmain()
set objexcel=CreateObject("Excel.Application")
objexcel.Visible=True
Set objWorkbook= objexcel.workbooks.Add()
set objsheet1=objWorkbook.sheets.item(1)
objsheet1.name="Points_Coordinates"
dim coords(2) as variant
CATIA.ActiveDocument.Selection.Search "(...
hi Calin,
there is no error in your code but also no result in Excel when I run it in my AllCatPart.
I need to get:
1- coordinates of points (I already have it)
2-names of GeometricalSets where I have each point
In attachment I saved screen from Catia. Maybe it will make things more clear...
sorry but I did some confusion...
After converting into AllCatPart I have my POINTS in Geometrical Sets not in Bodies.
So the Point's Parent = GeometricalSet
@LWolf
Your code works but shows either file name or root name(if I put there only one "Parent"
Pawel
Thanks a lot. It works for my Product where all Bodies have right name as "body" but I have to work with AllCatPart created from this Product.
So, my Body names are changed and unpredictable.
Is it possible to write "if" condition in such way:
If TypeName(parentObject) = "contains fragment of...
Hello every one,
I want in Catia V5 CatPart to export coordinates of all points and corresponding bodie's names.
I have a macro where I can export only points or only names. I can't join it in this way that receive a list where I see which point coordinates belongs to which body(name).
Can...