(API) Create spectral analysis

(API) Create spectral analysis

Anonymous
Not applicable
391 Views
1 Reply
Message 1 of 2

(API) Create spectral analysis

Anonymous
Not applicable

Hello,

 

I need to create a spectral analysis by API. I already create the spectral case but i can't find the way to edit the options and define the spectrum. Can someone send a example code?

 

regards,

0 Likes
Accepted solutions (1)
392 Views
1 Reply
Reply (1)
Message 2 of 2

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted solution
        Dim r As New RobotOM.RobotApplication
        Dim sc As RobotOM.RobotSimpleCase

        sc = r.Project.Structure.Cases.CreateSimple(10, "spec", RobotOM.IRobotCaseNature.I_CN_ACCIDENTAL, RobotOM.IRobotCaseAnalizeType.I_CAT_DYNAMIC_SPECTRAL)
        Dim sa As RobotOM.RobotSpectralAnalysisParams
        sa = sc.GetAnalysisParams
        Dim ras As RobotOM.RobotSpectralAnalysisSpectrum
        ras = sa.Spectrum
        Dim raspc As RobotOM.RobotSpectralAnalysisPointsCollection
        raspc = ras.Points
        raspc.Add(0, 0)
        raspc.Add(1, 1)
        raspc.Add(2, 0)
        ras.Name = "aaa"
        Dim rcamf As RobotOM.RobotCaseAnalysisModesFilter
        rcamf = sa.Filter
        rcamf.Type = RobotOM.IRobotCaseAnalysisModesFilterType.I_CAMFT_LIST_OF_MODES
        rcamf.Modes = "1"
        sc.SetAnalysisParams(sa)


Rafal Gaweda