Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Display diagrams using API

9 REPLIES 9
Reply
Message 1 of 10
Mirko.Jurcevic
712 Views, 9 Replies

Display diagrams using API

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..

If this solved your issue, please Accept it as Solution help other forum users with similar issues to find answers easily.
  
Mirko Jurcevic


My blog: www.engipedia.com
Try my Revit add-ins: Autodesk App Store
9 REPLIES 9
Message 2 of 10
Message 3 of 10

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?

 

If this solved your issue, please Accept it as Solution help other forum users with similar issues to find answers easily.
  
Mirko Jurcevic


My blog: www.engipedia.com
Try my Revit add-ins: Autodesk App Store
Message 4 of 10

try
Robot.robApp.Project.ViewMngr.GetView(1).ParamsDiagram.SetScale


Rafal Gaweda
Message 5 of 10

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..

If this solved your issue, please Accept it as Solution help other forum users with similar issues to find answers easily.
  
Mirko Jurcevic


My blog: www.engipedia.com
Try my Revit add-ins: Autodesk App Store
Message 6 of 10

it seems so


Rafal Gaweda
Message 7 of 10
raghed58
in reply to: Rafal.Gaweda

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 

Message 8 of 10

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

Message 9 of 10

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

Message 10 of 10

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report