'// COPYRIGHT DASSAULT SYSTEMES 2000
'//============================================================================
'//
'// Language="VBSCRIPT"
'// Sample of macro of using structural vb objects
'//
'//============================================================================
'//
'// Alain DEBUISSON			le 07/11/2000		creation 
'//
'//============================================================================

Sub CATMain()

    Dim doc As Document

    Dim StrWorkbench As StrWorkbench
    Dim strFactory As StrObjectFactory

    Set doc = CATIA.ActiveDocument
    Dim rootProduct As Product
    Set rootProduct = doc.Product
	dim strMembers as StrMembers

    Set strWorkbench = doc.GetWorkbench("StrWorkbench")
    Set strMembers = rootProduct.GetTechnologicalObject("StructureMembers")

	'============================================================
	' looking for a member
	'============================================================

	dim member as StrMember
	set member = strMembers.Item("Column_3")

	'============================================================
	' rotate a member
	'============================================================

	member.Rotate(45.0)

	'============================================================
	' anchor point modification
	'============================================================

	member.CurrentAnchorPointName = "catStrTopCenter"

	'============================================================
	' looking for a plate
	'============================================================

	dim strPlates as StrPlates
    Set strPlates = rootProduct.GetTechnologicalObject("StructurePlates")

	dim plate as StrPlates
	set plate = strPlates.Item("PlateType_12")
	
	'============================================================
	' inverse material orientation
	'============================================================

	plate.ReverseDirection
	
	'============================================================
	' thickness modification
	'============================================================

	plate.StandardThickness = 0.020

	'============================================================
	' update
	'============================================================

	rootProduct.Update
	
End Sub