Autodesk Simulation Moldflow Insight
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
api macro to create xy-plot with node id
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi, all
I'm troubling with the subjected api macro.
I want to create a XY-plot with known node ID.
Can anybody advise me which part is incorrect?
==================================================
SetLocale("en-us")
Set Synergy = CreateObject("synergy.Synergy")
Synergy.SetUnits "Metric"
Set PlotManager = Synergy.PlotManager()
Set Plot = PlotManager.CreatePlotByDsID(1180, True)
Plot.SetXYPlotShowLegend True
Set Viewer = Synergy.Viewer()
Viewer.ShowPlot Plot
Set PlotManager = Synergy.PlotManager()
Set Plot = Viewer.ActivePlot()
Set Plot = EntList.SelectFromString "N20258"
Plot.SaveXYPlotCurveData "%MY_DOCUMENTS%\My ASMI 2013 Projects\test\output.txt"
Set PlotManager = Synergy.PlotManager()
Set Plot = PlotManager.FindPlotByName2("Pressure:XY Plot", "Pressure")
Set Viewer = Synergy.Viewer()
Viewer.HidePlot Plot
==================================================
Best Regards,
Solved! Go to Solution.
Re: api macro to create xy-plot with node id
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
please, see below.
Regards,
Berndt
'=================================================
SetLocale("en-us")
Set Synergy = CreateObject("synergy.Synergy")
Synergy.SetUnits "Metric"
Set StudyDoc = Synergy.StudyDoc()
Set EntList = StudyDoc.CreateEntityList() '* create an empty entity list
Set PlotManager = Synergy.PlotManager()
Set Plot = PlotManager.CreatePlotByDsID(1180, True)
Plot.SetXYPlotShowLegend True
Set Viewer = Synergy.Viewer()
Set PlotManager = Synergy.PlotManager()
Set Plot = Viewer.ActivePlot()
Set PlotManager = Synergy.PlotManager()
Set Plot = PlotManager.FindPlotByName2("Pressure:XY Plot", "Pressure")
Set Viewer = Synergy.Viewer()
EntList.SelectFromString "N20258" '* popoulate the entity list
Plot.AddXYPlotCurve(EntList) '* plot the curve of entity
Viewer.ShowPlot Plot
'=================================================
Berndt Nordh
Moldflow Support Specialist
Product Support
Autodesk, Inc.
Re: api macro to create xy-plot with node id
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Dear Berndt-san
Thank you for your help!
It worked well.
Best Regards,
Shige
