|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
下面代码是获取运动算例中曲线数值,为什么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()
|
|