How can I simply display bar MY diagram with API, I have (C#):
IRobotViewType viewType = IRobotViewType.I_VT_DIAGRAMS;
IRobotViewDiagramResultType diagMY = IRobotViewDiagramResultType.I_VDRT_NTM_MY;
IRobotView view = Robot.robApp.Project.ViewMngr.CreateView(viewType); ???
I've been looking in API documentation, but I can't figure it out..
check this thread
Thanks, I've used it and get this code working:
IRobotView3 viewRobot = (IRobotView3)Robot.robApp.Project.ViewMngr.GetView(1); //Explicit cast for enabling screen capture method
viewRobot.ParamsDiagram.Set(IRobotViewDiagramResultType.I_VDRT_NTM_MY, true);
viewRobot.Selection.Get(IRobotObjectType.I_OT_CASE).Get(1);
viewRobot.ParamsDiagram.Descriptions = IRobotViewDiagramDescriptionType.I_VDDT_TEXT;
viewRobot.ParamsDiagram.Filling = IRobotViewDiagramFillingType.I_VDFT_FILLED;
//viewRobot.ParamsDiagram.SetScale(IRobotViewDiagramResultType.I_VDRT_NTM_MY, 10000);
viewRobot.Projection = IRobotViewProjection.I_VP_3DXYZ;
viewRobot.Redraw(1);
Robot.robApp.Project.ViewMngr.Refresh();
My further question is:
Is there a way to add automatic normalization of diagrams?
Or should I go by finding largest value and adjusting scale accordingly?
Nope
It won't take SetScale method without arguments.
I can put smthng like this:
Robot.robApp.Project.ViewMngr.GetView(1).ParamsDiagram.SetScale(IRobotViewDiagramResultType.I_VDRT_NTM_MY, 1250);
But that 1250 number is explicit scale that I don't know what it will be.
Only if I determine it by code, finding max value etc..
Hello All,
I am trying to get a result view of the reactions on supports using :
mavueRobot.ParamsDiagram.Set(IRobotViewDiagramResultType.I_VDRT_REACTION_FORCES, True)
but i gut nothing
what should i do to get the reactions view
Thanks
hi @raghed58
Note that you can't find an "apply" function and that, in certain case, checkbox of option could be on but parameters from dialogbox not applied. For that the dialogbox must be setted manually in the view one time at first before running macros.
Use I_VDRT_REACTION_FX, FY, FZ, ... and so. instead of I_VDRT_REACTION_FORCES, I_VDRT_REACTION_MOMENTS...
Use cleaner function to set to off all parameters.
Anyway, for multiple settings, set them one by one or iterate over a collection of results types (FX, ... , MX, ... etc.) or, even better, create a predefined pattern collection of arrays of types of results (for example for forces, reactions, etc.) (see example), to be on by step or be mixed in case of printouts.
Best regards
hi @raghed58
Example:
Dim ViewMngr As RobotViewMngr
Dim MyView As IRobotView3
Set ViewMngr = RobApp.Project.ViewMngr
Set MyView = ViewMngr.GetView(1)
'Same as I_VDRT_REACTION_FORCES
GraphicalResults = Array(I_VDRT_REACTION_FX, I_VDRT_REACTION_FY, I_VDRT_REACTION_FZ)
For I = 0 To UBound(GraphicalResults)
MyView.ParamsDiagram.Set GraphicalResults(I), True
Next I
MyView.Redraw 1
ViewMngr.Refresh
Best regards
Thanks a lot for the Information , it looks like i was working on RobotOM 2014 which doesn't have I_VDRT_REACTION_FX, FY, FZ...
i found them in RobotOM 2019
Thanks again