Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

transparency 1

Status
Not open for further replies.

lapek

Aerospace
Aug 26, 2013
37
MX
hi every one

here again giving trouble to all of you guys, I want to get my solid transparency, and I found a command SetRealOpacity but some how I can not set it

here is the code im using

CATIA.ActiveDocument.Selection.Clear
Set objsel = CATIA.ActiveDocument.Selection
objsel.Search "Type=Topology.Face,all"

objsel.SetRealOpacity 255, 1

icnt = objsel.Selection.Count
ReDim MySurface(icnt + 1)

For o = 1 To icnt
Set MySurface(o) = objsel.Item(o).Value
Next o

Dim spabench As SPAWorkbench
Dim mymeas As Measurable
Dim centroide
Dim ref1 As Reference
Dim myans As Double
Dim InputObjectType(0)
Dim variable As String

'*******************Toma Fotografia de la Superficie Seleccionada***************
For o = 1 To icnt

Dim ObjViewer3D As Viewer3D
Set ObjViewer3D = CATIA.ActiveWindow.ActiveViewer
Dim objCamera3D As Camera3D
Set objCamera3D = CATIA.ActiveDocument.Cameras.Item(1)

Dim j
CATIA.ActiveDocument.Selection.Clear
CATIA.ActiveDocument.Selection.Add (MySurface(o))
'Ubicacion del guardado de la imagen
Dim fileloc As String
fileloc = "C:\Users\Lab3\Desktop\Fotos\"
Dim exten As String
exten = ".jpg"
Dim strName As String
strName = fileloc & CStr(o) & exten

Dim objSpecWindow As SpecsAndGeomWindow
Set objSpecWindow = CATIA.ActiveWindow
objSpecWindow.Layout = catWindowGeomOnly
CATIA.StartCommand ("Compass")

'Toma la Fotografia
ObjViewer3D.FullScreen = True
ObjViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D
ObjViewer3D.CaptureToFile 5, strName

ObjViewer3D.FullScreen = False
objSpecWindow.Layout = catWindowSpecsAndGeom
CATIA.StartCommand ("Compass")
'ObjViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D

Next o

its just a section, what I need it to get the solid transparent, and then in the cicle remove the transparency of the selected face and give a color,

hope you can help me with this,

thank you for your time
 
Replies continue below

Recommended for you

This is from CATIA Portable Script Center, maybe you will get some other ideas.

Code:
Language="VBSCRIPT"

Sub CATMain()

Dim specsAndGeomWindow1 As Window
Set specsAndGeomWindow1 = CATIA.ActiveWindow

Dim viewer3D1 As Viewer
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer

Dim viewpoint3D1 As Viewpoint3D
Set viewpoint3D1 = viewer3D1.Viewpoint3D


Text = InputBox("After click OK you will see Rendering mode 0 = shading Gouraud", "RenderingMode", "RenderingMode 0", 150, 9000) 
viewer3D1.RenderingMode = 0

Text = InputBox("After click OK you will see Rendering mode 1 = shading Gouraud with edges", "RenderingMode", "RenderingMode 1", 150, 9000) 
viewer3D1.RenderingMode = 1

Text = InputBox("After click OK you will see Rendering mode 2 = wireframe with edge lines", "RenderingMode", "RenderingMode 2", 150, 9000) 
viewer3D1.RenderingMode = 2

Text = InputBox("After click OK you will see Rendering mode 3 = wireframe without hidden lines", "RenderingMode", "RenderingMode 3", 150, 9000) 
viewer3D1.RenderingMode = 3

Text = InputBox("After click OK you will see Rendering mode 4 = shading Gouraud outlines with edges", "RenderingMode", "RenderingMode 4", 150, 9000) 
viewer3D1.RenderingMode = 4

Text = InputBox("After click OK you will see Rendering mode 5 = shading with material without edge lines", "RenderingMode", "RenderingMode 5", 150, 9000)
viewer3D1.RenderingMode = 5

Text = InputBox("After click OK you will see Rendering mode 6 = shading with material with edge lines", "RenderingMode", "RenderingMode 6", 150, 9000) 
viewer3D1.RenderingMode = 6

Text = InputBox("After click OK you will see Rendering mode 7 = shading with edge and hidden lines", "RenderingMode", "RenderingMode 7", 150, 9000) 
viewer3D1.RenderingMode = 7

Text = InputBox("After click OK you will see Rendering mode 8 = shading Gouraud no smooth edges", "RenderingMode", "RenderingMode 8", 150, 9000) 
viewer3D1.RenderingMode = 8

Text = InputBox("After click OK you will see Rendering mode 9 = wireframe no smooth edges no vertices", "RenderingMode", "RenderingMode 9", 150, 9000) 
viewer3D1.RenderingMode = 9

Text = InputBox("After click OK you will see Rendering mode 10 = wireframe half visible smooth edges no vertices", "RenderingMode", "RenderingMode 10", 150, 9000) 
viewer3D1.RenderingMode = 10

Text = InputBox("After click OK you will see Rendering mode 11 = shading Gouraud outlines with edges ", "RenderingMode", "RenderingMode 11", 150, 9000) 
viewer3D1.RenderingMode = 11

Text = InputBox("After click OK you will see Rendering mode 12 = shading Gouraud outlines with edges no vertices", "RenderingMode", "RenderingMode 12", 150, 9000) 
viewer3D1.RenderingMode = 12

Msgbox "And So On"

End Sub

Regards
Fernando

 
hi every one, never mind I solve the issue, thanks a lot
 
thank you for the post ferdo, I really get more ideas on this

you are awesome
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top