change view
change view
(OP)
hi guys
I am having trouble creating a macro
here is the thing, I have a surface selected, then I colored it, and I wanted to take a picture, but sometimes the face is hided,
what I need to know is, if there is a way to change the view of my part by the selected surface,
like when you do it manually, select surface, click under normal view and it rotates.
hope you can understand my issue.
thank you so much for your help
I am having trouble creating a macro
here is the thing, I have a surface selected, then I colored it, and I wanted to take a picture, but sometimes the face is hided,
what I need to know is, if there is a way to change the view of my part by the selected surface,
like when you do it manually, select surface, click under normal view and it rotates.
hope you can understand my issue.
thank you so much for your help





RE: change view
use
CATIA.StartCommand "Normal View"
This will make the surface selected normal to your screen.
Regards,
Maddy
RE: change view
when I apply the command in my macro it only works the first time, and do not colored the surface selected, hope you can help me with this issue, thanks
Sub CATmain()
'**************************COLOREA CARA*****************************
Dim visProperties1 As VisPropertySet
Dim icnt As Integer
Dim MySurface As Variant
Dim MySelection As Selection
Dim i
CATIA.ActiveDocument.Selection.Clear
Set objsel = CATIA.ActiveDocument.Selection
objsel.Search "Type=Topology.Face,all"
icnt = objsel.Selection.Count
ReDim MySurface(icnt + 1)
For i = 1 To icnt
Set MySurface(i) = objsel.Item(i).Value
Next i
For i = 1 To icnt
CATIA.ActiveDocument.Selection.Clear
CATIA.ActiveDocument.Selection.Add (MySurface(i))
CATIA.StartCommand "Normal View"
Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
CATIA.ActiveDocument.Selection.VisProperties.SetRealColor 255, 0, 0, 1
For j = 1 To icnt
If j <> i Then
CATIA.ActiveDocument.Selection.Clear
CATIA.ActiveDocument.Selection.Add (MySurface(j))
Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
CATIA.ActiveDocument.Selection.VisProperties.SetRealColor 255, 255, 255, 1
End If
Next
CATIA.ActiveDocument.Selection.Clear
RE: change view
is there a way to change the edges color in a macro? a found how to change the background, the selection lines but the edges I cant do it
hope you can help me, thank you
RE: change view
As far as I know, edges color can be changed only if you previously extract them as independent entities...
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: change view
well, I will look for a combination of color that best show what I need,
thank you so much for your help and time