Hi,
I have a problem with my macro. The command of projection in 3D doesn't work. My view stay in XZ plane.
robapp.Window.Activate
Set mavueRobot = robapp.Project.ViewMngr.CreateView(1)
mavueRobot.Projection = I_VP_3DXYZ
mavueRobot.Visible = True
mavueRobot.Redraw (True)
I want also make a capture of my model with diagram of results. Have you an example of code for it ?
I would like to get for final result the exemple in attachment.
Solved! Go to Solution.
Solved by Rafal.Gaweda. Go to Solution.
Try this with rtd file and if it works fine please send me whole macro + str file
Sub robot_donnees() ' ouverture de robot, la session s'appellera robapp Set Robapp = New RobotApplication ' ce sera une structure de type panneaux Robapp.Project.New (I_PT_SHELL) Robapp.Project.Open "c:\RG\Fichier structure.rtd" Robapp.Project.CalcEngine.Calculate ' calculate model Dim mavueRobot As IRobotView3 ' this is important to set IRobotView3 if you want to make screen capture of this view Set mavueRobot = Robapp.Project.ViewMngr.GetView(1) 'Vue mise a jour mavueRobot.Projection = I_VP_3DXYZ mavueRobot.Redraw (True) mavueRobot.ParamsDisplay.SymbolSize = 2 'marche uniquement avec ROBOT 2012 Robapp.Project.ViewMngr.Refresh Robapp.Project.SaveToFormat I_PSF_RTD, "c:\RG\Fichier structure_1.rtd" MsgBox "QUITTER APPLICATION ROBOT" Robapp.Quit I_QO_DISCARD_CHANGES ' Quitter sans sauvegarde End Sub
It's not really a solution to remove line of command in the macro because this macro was working before.
Since I have done an update of RSA 2012 it's not working the command is not working anymore.
Maybe it's my computer ?
Robapp.Quit I_QO_DISCARD_CHANGES
Maybe it's my computer ?
Maybe. That's why I asked for complete macoro \ xls file together with str file.
Sub quit_robot() Robapp.Quit I_QO_DISCARD_CHANGES ' Quitter sans sauvegarde End Sub
I have made a simple macro which was working before and you don't need the xls file.
Hi Rafal,
I'm using the macro above to extract results maps for a loadcombination envelope. Please can you show me how to edit the macro to allow the specification of either top or bottom envelope maps which you would normally select in the box shown in the attached pdf? i.e. most +ve and most -ve results shown as separate maps.
Thanks in advance,
George Gray
Dim v As RobotView Set v = RobApp.Project.ViewMngr.GetView(1) v.SetVisibilityStatus I_VVST_ENVELOPES, I_VVSV_ENVELOPES_MAX 'for bottom envelope 'v.SetVisibilityStatus I_VVST_ENVELOPES, I_VVSV_ENVELOPES_MIN v.Redraw 1
Thanks, much appreciated. Additionally, can you tell me how to specify the active view in Robot rather than a numbered veiw?
Thanks.
Thanks, think I'll stick with a user specified view number in that case. Hopefully this should be the final question, I have a situation where the view scale is being refreshed and altered when using:
RView.SetVisibilityStatus I_VVST_ENVELOPES, I_VVSV_ENVELOPES_MAX
RobApp.Project.ViewMngr.Refresh
RView.Redraw View
Where "View" is representing the viewport number in Robot.
It looks like Redraw is influencing the zoom of my viewport. Do you know of a way to switch maps and envelopes, then refresh the viewport to show the new map and envelope whilst leaving the zoom unaffected?
Thanks in advance.
Dim v As RobotView Set v = RobApp.Project.ViewMngr.GetView(1) Dim l As Double, t As Double, b As Double, r As Double l = 0 t = 0 b = 0 r = 0
v.GetZoom l, t, r, b v.SetVisibilityStatus I_VVST_ENVELOPES, I_VVSV_ENVELOPES_MAX 'for bottom envelope 'v.SetVisibilityStatus I_VVST_ENVELOPES, I_VVSV_ENVELOPES_MIN v.Redraw 1 v.SetZoom l, t, r, b RobApp.Project.ViewMngr.Refresh
or
Dim v As RobotView Set v = RobApp.Project.ViewMngr.GetView(1)
v.SetVisibilityStatus I_VVST_ENVELOPES, I_VVSV_ENVELOPES_MAX
'for bottom envelope 'v.SetVisibilityStatus I_VVST_ENVELOPES, I_VVSV_ENVELOPES_MIN
RobApp.Project.ViewMngr.Refresh
Rafal,
Another interesting point. Can you explain where the attached results map options can be found - Complex - Tensile Reinforcement (N>0) and Complex - Compressive Reinforcement? It looks like they are missing from the list of items under .currentresult. Also looks like they're missing in the Robot 2014 API guide.
Thanks in advance,
George
Rafal,
Another interesting point. Can you explain where the attached results map options can be found - Complex - Tensile Reinforcement (N>0) and Complex - Compressive Reinforcement? It looks like they are missing from the list of items under .currentresult. Also looks like they're missing in the Robot 2014 API guide.
Thanks in advance,
George
Oh dear... Wish I'd known that yesterday! Thanks for your response. Is this available in Robot 2015? (I'm currently using 2014). If not, can it be made available in the future?
Regards,
George
Add this wish here:
Hi Rafal,
Request added, thanks for your help. Can you show me how to return the zoom properties of a particular viewport in VBA? I wish to assign them to a variable to be edited in vba and then returned to Robot using .SetZoom.
Set RobotMapView = RobApp.Project.ViewMngr.GetView(1)
With RobotMapView
.GetZoom
End With
Thanks in advance,
George.
Thanks for your previous response.
Is there a way to access the results map scale normalize button using API? I have a problem when capturing sets of maps consecutively using the screen capture macro from earlier in this post (I've added a loop to run through a series of maps) where the scale often fails to update resulting in white/blank patches on the maps. This seems to be fixed by refreshing/normalizing the map scale but I need a way to do this from API as the macro runs. I've attached an example of the problem.
Any ideas on how to address this?
Thanks.
Can't find what you're looking for? Ask the community or share your knowledge.