white background with black text
white background with black text
(OP)
Hello All,
When I change graphic background to white color, white text of captures are invisible.
How can I change text to black with a VBA code or Catscript) in Catia 2015 while background is in white so that I can see the text?
Thank you All
Quin
When I change graphic background to white color, white text of captures are invisible.
How can I change text to black with a VBA code or Catscript) in Catia 2015 while background is in white so that I can see the text?
Thank you All
Quin





RE: white background with black text
what is your progress so far?
indocti discant et ament meminisse periti
RE: white background with black text
This works fine with the file I have.
you could look into this, find a search syntax that would work, then select the result and change color to black.
many example of all that on v5automation or catia portable script center.
post your code so i can help
indocti discant et ament meminisse periti
RE: white background with black text
Here is an example of the capture's text I want to get to and change text color to black.
---------------------------- VBA CODE ---------------
Sub CATMain()
MsgBox "Active document must be a part document and captures are expanded " & Chr(13) & "in order to have the macro works properly."
'//// Access the active document
Dim PartDoc As Document
Set PartDoc = CATIA.ActiveDocument
'//// Set PartRoot part from the PartDoc part document
Dim PartRoot
Set PartRoot = PartDoc.Part
'//// Set user's annotation collection = PartRoot annotation sets, which has multiple annotation sets
Dim myAnnotCollection
Set myAnnotCollection = PartRoot.AnnotationSets
' myAnnotCollection.Clear
'//// Get first annotation set from annotation collection, myAnnotCollection
Dim AnnoSet1
Set AnnoSet1 = myAnnotCollection.Item(1)
'//// Get the number of captures in "annotSet1" above
Dim myCaptures, NumberOfCaptures
Set myCaptures = AnnoSet1.Captures '//// Access captures inside the annotation set
NumberOfCaptures = AnnoSet1.Captures.Count
MsgBox "Number of annotation sets in active document is: " & myAnnotCollection.Count & " and number of captures is: " & NumberOfCaptures
'//// Loop through capture collection
Dim j As Integer
For j = 1 To myCaptures.Count
'//// Display the current capture
Set myCaptures = AnnoSet1.Captures.Item(j)
'//// Display the annotated Capture, one-by-one, on the monitor if it is not "All" or "Change" captures
myCaptures.DisplayCapture
MsgBox "Capture #: " & j & ", " & myCaptures.Name
MsgBox "Capture #: " & j & "," & myCaptures.Name.Value '//// Error is right here: "Object required"
Next
End Sub
-------------------------- end of vba code --------------------
My above VBA code only gets to the point where I can access and display the captures on the monitor.
I think I need to obtain "text value" of the captures first, then change text color to black, but I do not know how.
Please help me out?
"...many example of all that on v5automation or catia portable script center." I have looked into V5Automation but not able to locate those examples. Please lead me there.
I do not have "catia portable script center." Could you please give me a copy?
Thank you in advance
Quin
RE: white background with black text
the Capture is not a text, it is a definition of what is visible or not when showed. When you DisplayCapture, it actually change the visible state of elements.
So what you want to do is actually change the color of the FTA elements. So first you need to select them.
Play with the advance search function in CATIA, once you can select only what you need, then go back to scripting and do it.
I would be surprised if I could not find selection search or how to change color in v5automation file.
I will not give you code for free, I am looking for a job, while you are being paid. I will guide you to find what you are looking for.
Keep posting your progress, there was nothing about selecting text/FTA or changing color in what you posted... keep trying
indocti discant et ament meminisse periti
RE: white background with black text
I am not familiar with the term and its meaning?
Quin
RE: white background with black text
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: white background with black text
How can I select the text element.
I searched the V5Automation but not able to locate "text" references yet.
Thanks
Quin
RE: white background with black text
then go in CATIA VBA doc and search for "search"
indocti discant et ament meminisse periti