Autodesk Robot Structural Analysis
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Ok but my PC is new and I don't have installed any Robot before. I have only installed RSA 2012.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
To register it properly please open Command Prompt as Administrator, registsrer robot, check macro.
If it still does not work please respond to e-mail sent to yout from our system

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
sorgjee wrote:Your EXACT code does not run due to a typo. Even without the typo, and using the rest of the code exactly as you've written, yes, it still crashes.
Regards,
Even
It's the same for me. Robot crash when ask for better resolution.
I think it's because my computer is not enough speed. When I do some break in the macro it's working. What do I need in the computer ?
I'm in windows seven 64bit with ARSA 2012 and Office 2010
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Use from time to time DoEvents
or pause code in some places. Pause function dos not exist in VBA so write your own function - example below
This function pauses code for 5 seconds
Sub Wait()
waitTime = 5
Start = Timer
While Timer < Start + waitTime
DoEvents
Wend
End Sub

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Is that possible to ask Robot : "W
RG_Adsk wrote:Use from time to time DoEvents
or pause code in some places. Pause function dos not exist in VBA so write your own function - example below
This function pauses code for 5 seconds
Sub Wait() waitTime = 5 Start = Timer While Timer < Start + waitTime DoEvents Wend End Sub
hen the generation of the vue is finished, do something else" ?
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
View generation is one command \ line. After finishing it program steps to another code line.

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
RG_Adsk wrote:View generation is one command \ line. After finishing it program steps to another code line.
So how explain that robot crash if I don't put sleeping times :
Sleep 33000 '33 secondes to generate a view of mobile loads
Sub cree_vues_resultats()
If Not Robapp.Visible Then
Set Robapp = Nothing
MsgBox "Open Robot", vbOKOnly, "ERROR"
Exit Sub
End If
fichier_sortie = Range("AE16").Value
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) ' it seems CreateView makes this strange affect, use GetView instead
mavueRobot.ParamsDisplay.Set 68, False 'symbole charges ponctuelles
mavueRobot.ParamsDisplay.Set 69, False 'symbole charges lineaires
mavueRobot.ParamsDisplay.Set 70, False 'symbole charges surfaciques
mavueRobot.Projection = I_VP_XY_3D
'mavueRobot.Projection = I_VP_3DXYZ
mavueRobot.ParamsDisplay.Set I_VDA_OTHER_RULER, True
Robapp.Project.ViewMngr.Refresh
'faire un zoom
Sheets("Sommaire").Select
transvfactor = Range("I32").Value
transhfactor = Range("I31").Value
zoomfactor = Range("I30").Value
Call zoom_robot
'mavueRobot.Visible = True
'mavueRobot.Redraw (True)
'Robapp.Project.ViewMngr.Refresh
'MsgBox ("Regler la vue dans le modèle")
Sheets("Sommaire").Select
casprem = Range("N18").Value
casder = Range("N19").Value
prem_cas_roul = Range("N17").Value + 1
For i = casprem To casder
Cas = i
mavueRobot.ParamsFeMap.WithDescription = True
mavueRobot.ParamsDisplay.Set I_VDA_SECTIONS_SYMBOLS, False
If Range("I21").Value = "Myy +" Then
mavueRobot.ParamsFeMap.CurrentResult = I_VFMRT_COMPLEX_REINFORCE_TOP_MYY
sollicitation = "Moments Myy+"
'pour les charges roulantes attention
If i >= prem_cas_roul Then
Cas = prem_cas_roul + (casder - prem_cas_roul + 1) * 3 + ((i - prem_cas_roul) * 2 + 0)
End If
End If
If Range("I21").Value = "Mxx +" Then
mavueRobot.ParamsFeMap.CurrentResult = I_VFMRT_COMPLEX_REINFORCE_TOP_MXX
sollicitation = "Moments Mxx+"
'pour les charges roulantes attention
If i >= prem_cas_roul Then
Cas = prem_cas_roul + (casder - prem_cas_roul + 1) * 3 + ((i - prem_cas_roul) * 2 + 0)
End If
End If
If Range("I21").Value = "Myy -" Then
mavueRobot.ParamsFeMap.CurrentResult = I_VFMRT_COMPLEX_REINFORCE_BOTTOM_MYY
sollicitation = "Moments Myy-"
'pour les charges roulantes attention
If i >= prem_cas_roul Then
Cas = prem_cas_roul + (casder - prem_cas_roul + 1) * 3 + ((i - prem_cas_roul) * 2 + 1)
End If
End If
If Range("I21").Value = "Mxx -" Then
mavueRobot.ParamsFeMap.CurrentResult = I_VFMRT_COMPLEX_REINFORCE_BOTTOM_MXX
sollicitation = "Moments Mxx-"
'pour les charges roulantes attention
If i >= prem_cas_roul Then
Cas = prem_cas_roul + (casder - prem_cas_roul + 1) * 3 + ((i - prem_cas_roul) * 2 + 1)
End If
End If
mavueRobot.Selection.Get(I_OT_CASE).FromText (Cas) ' selecting case for results display
ecran_capture = sollicitation & "_ Cas " & i
mavueRobot.Redraw (0)
Sleep 33000 '33 secondes to generate a view of mobile loads
Robapp.Project.ViewMngr.Refresh
Call screen_capture
Next i
'saving printout \ report to file
'robapp.Project.PrintEngine.SaveReportToFile fichier_sortie, I_OFF_RTF_JPEG
Robapp.Project.PrintEngine.SaveReportToFile fichier_sortie, I_OFF_RTF
'or directly opening printout in Word
Robapp.Project.PrintEngine.ExternalPreviewReport EPF_MS_OFFICE
'MsgBox "QUITTER APPLICATION ROBOT"
Sleep 10000
Robapp.Quit I_QO_DISCARD_CHANGES ' Quitter sans sauvegarde
End Sub
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
send me whole your xls file and any other files required like mobile loads database etc.

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi
I've got a problem with the scale in the view. It's not the good one I have to do the command normalize in Robot.
Is there a command in VBA API for this ?
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Unfortunately you can not control scale on force normalization thru API.

Rafal Gaweda
Product Support
Autodesk, Inc.



