iCAx开思网

标题: 关于运动算例中获取曲线数值的问题 [打印本页]

作者: crz222    时间: 2018-4-28 11:28
标题: 关于运动算例中获取曲线数值的问题
下面代码是获取运动算例中曲线数值,为什么SelectByID2改成点PlotOutput输入的值为noting ,创建曲线图也创建不了, 改成了面就没有问题了,难道是Entities 只能选择面不能选择其他的吗?

status = swModelDocExt.SelectByID2("Point1@草图1@摆板@模型-", "EXTSKETCHPOINT", 0.0649838272318766, -0.178541597949323, 0, False, 0, Nothing, 0)
        status = MotionStudy.Calculate   
        MotionStudyResults = MotionStudy.GetResults(4)  
        swSimPlotFeatureData = MotionStudyResults.CreatePlotFeatureData()   
        swSimPlotXAxisFeatureData = MotionStudyResults.CreatePlotXAxisFeatureData()   
        swSimPlotYAxisFeatureData(0) = MotionStudyResults.CreatePlotYAxisFeatureData()   
        swSimPlotYAxisFeatureData(0).Type = swMotionPlotAxisType_e.swMotionPlotAxisType_TRANS_DISP
        swSimPlotYAxisFeatureData(0).Component = 1   
        Dim swSketchPt(0) As SketchPoint
        swSketchPt(0) = swSelMgr.GetSelectedObject6(1, -1)
        swFaceArray = swSketchPt
        swSimPlotYAxisFeatureData(0).Entities = swFaceArray
        swPlotFeature = MotionStudyResults.InsertPlotFeature(swSimPlotFeatureData, swSimPlotXAxisFeatureData, swSimPlotYAxisFeatureData(0))
        swYAxisArray = swSimPlotYAxisFeatureData
        PlotOutput = MotionStudyResults.GetValues(swSimPlotFeatureData, swSimPlotXAxisFeatureData, (swYAxisArray))
        swXData = PlotOutput.GetXAxis()  






欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3