Discussion Groups

Robot Structural Analysis

Reply
Distinguished Contributor
mateaus
Posts: 120
Registered: ‎10-10-2011

Re: Command VBA Projection Capture of a view

06-18-2012 03:01 AM in reply to: Rafal.Gaweda

Hi,

 

I would like to select all "combinaisons" or all of "cas simples" but not both.

 

combinaisons selection.PNG

 

I test 

 

mavueRobot.Selection.Get(I_OT_CASE).FromText ("Combinaisons") ' selecting case for results display

 

but it doesn't work,

 

Have you got a solution ?

 

 

 

 

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,604
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

06-18-2012 05:14 AM in reply to: mateaus
Dim SimpleCaseSel As RobotSelection
Dim ManualCombSel As RobotSelection

Set SimpleCaseSel = RobApp.Project.Structure.Selections.CreatePredefined(I_PS_CASE_SIMPLE_CASES)
Set ManualCombSel = RobApp.Project.Structure.Selections.CreatePredefined(I_PS_CASE_COMBINATIONS)


mavueRobot.Selection.Get(I_OT_CASE).FromText (SimpleCaseSel.ToText) ' all simple case for results display

'or

mavueRobot.Selection.Get(I_OT_CASE).FromText (ManualCombSel.ToText) ' all manual combinations for results display

 



Rafal Gaweda
Please use plain text.
Distinguished Contributor
mateaus
Posts: 120
Registered: ‎10-10-2011

Re: Command VBA Projection Capture of a view

07-10-2012 07:13 AM in reply to: Rafal.Gaweda

I would like to add a fiew pages in my note like the attached file by macros VBA.

 

caracteristics

+nodes

+bars

+loads

+...

+ Captures of views

 

Is that possible ?captures&donnéesmodele.PNG

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,604
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

07-23-2012 05:42 AM in reply to: mateaus

mateaus wrote:

I would like to add a fiew pages in my note like the attached file by macros VBA.

 

caracteristics

+nodes

+bars

+loads

+...

+ Captures of views

 

Is that possible ?


I guess you want to make screen captures of tables.

Create table, make screen capture of it, Example code below:

 

Dim Rtable As RobotTable
Dim ScPar As RobotTableScreenCaptureParams
Set ScPar = robapp.CmpntFactory.Create(I_CT_TABLE_SCREEN_CAPTURE_PARAMS)

ScPar.Name = "Rtable"

Set Rtable = robapp.Project.ViewMngr.CreateTable(I_TT_BARS, I_TDT_BAR)
'  Rtable.AddColumn 1  -  modify tables if you want by adding or removing columns
Rtable.MakeScreenCapture ScPar

 



Rafal Gaweda
Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,604
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

07-23-2012 05:45 AM in reply to: mateaus

I've got a problem to export result view in a file (word or rtf)

 and the header with word are not good :

 Can you help me ?


If it is not sorted out by you please send me your macro.



Rafal Gaweda
Please use plain text.
Distinguished Contributor
mateaus
Posts: 120
Registered: ‎10-10-2011

Re: Command VBA Projection Capture of a view

11-19-2012 04:15 AM in reply to: Rafal.Gaweda

Hi,

 

My command 

 

Robapp.Quit I_QO_DISCARD_CHANGES

 

doesn't work any more.

 

Do you have a solution. I just want to save and quit the model.

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,604
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

11-19-2012 05:41 AM in reply to: mateaus

I just want to save and quit the model.


robapp.Quit I_QO_SAVE_CHANGES



Rafal Gaweda
Please use plain text.
Distinguished Contributor
mateaus
Posts: 120
Registered: ‎10-10-2011

Re: Command VBA Projection Capture of a view

11-20-2012 12:54 AM in reply to: Rafal.Gaweda

that's the same Robot can't close normally. The programm bug :

 

bug robot.PNG

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,604
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

11-20-2012 12:58 AM in reply to: mateaus

Send me the latest version of your macro.



Rafal Gaweda
Please use plain text.
Distinguished Contributor
mateaus
Posts: 120
Registered: ‎10-10-2011

Re: Command VBA Projection Capture of a view

11-20-2012 06:17 AM in reply to: Rafal.Gaweda
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)
    
If Range("I24").Value = "NON" Then
Robapp.Visible = False
Else
Robapp.Visible = True
End If

If Range("I25").Value = "NON" Then
Robapp.Interactive = False
Else
Robapp.Interactive = True
End If

If Range("I26").Value = "NON" Then
Robapp.UserControl = False
Else
Robapp.UserControl = True
End If

Dim RetVal

Sleep 1000

A = Range("AE2").Value

affaire = Range("AE14").Value


Robapp.Project.OpenExtFile A, I_EFF_STR, 1  ' Ouvre le fichier text se trouvant dans A

Call initialisation_semelle
 
Call Plaque_Robot

' MsgBox "Calcul terminé"


'robapp.Project.Close

'robapp.Quit = True

'Appuis entretoises


'Call appuis_robot

Call charges


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 à jour
mavueRobot.Projection = I_VP_3DXYZ
mavueRobot.Redraw (True)
mavueRobot.ParamsDisplay.SymbolSize = 2 'marche uniquement avec ROBOT 2012
Robapp.Project.ViewMngr.Refresh

'sauvegarde fichier robot
sauv = affaire

Robapp.Project.SaveToFormat I_PSF_RTD, sauv
'robapp.Project.SaveAs sauv

Sheets("Sommaire").Select

MsgBox "QUITTER APPLICATION ROBOT"

Robapp.Quit I_QO_DISCARD_CHANGES  ' Quitter sans sauvegarde

End Sub

 

Please use plain text.