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: 

(API) Command VBA Projection Capture of a view

145 REPLIES 145
SOLVED
Reply
Message 1 of 146
Anonymous
10367 Views, 145 Replies

(API) Command VBA Projection Capture of a view

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.

145 REPLIES 145
Message 41 of 146
Anonymous
in reply to: Rafal.Gaweda

Maybe you can find the solution in my VBA codes.

 

I send you the file text of the model.

 

 

Message 42 of 146
Rafal.Gaweda
in reply to: Anonymous

As far as I can see there are no loads is case 1 and case 3 in model.

For the model on movie I have created sw in case 1 and some loads in casse 3.

Your code works fine.



Rafal Gaweda
Message 43 of 146
Anonymous
in reply to: Rafal.Gaweda

The case 1 and 2 are defined in the text file. The case 3 is defined in VBA. Do you need Excel file to verify ? 

Message 44 of 146
Rafal.Gaweda
in reply to: Anonymous


mateaus wrote:

The case 1 and 2 are defined in the text file.

 

Yes, but loads assigned directly to FEs are no displayed

 

The case 3 is defined in VBA. Do you need Excel file to verify ? 

 

Please attach.

 



Rafal Gaweda
Message 45 of 146
Anonymous
in reply to: Rafal.Gaweda

I would like to have the moment My on the view, I suppose it's a command like 

 

mavueRobot.ParamsFeMap.CurrentResult = I_VFMRT_COMPLEX_REINFORCE_TOP_MXX

 

maybe 

 

mavueRobot.ParamsFeMap.CurrentResult = I_VBMRT_NTM_MY

 

Sub cree_vues_resultats()

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 I_VDA_OTHER_RULER, True


mavueRobot.Visible = True
mavueRobot.Redraw (True)
robapp.Project.ViewMngr.Refresh

' displaying map

mavueRobot.ParamsFeMap.WithDescription = True
mavueRobot.ParamsDisplay.Set I_VDA_SECTIONS_SYMBOLS, False

mavueRobot.ParamsFeMap.CurrentResult = I_VBMRT_NTM_MY

For i = 1 To 26
mavueRobot.Selection.Get(I_OT_CASE).FromText (i) ' selecting case for results display
ecran_capture = "moments My - Cas " & i
mavueRobot.Redraw (0)
robapp.Project.ViewMngr.Refresh

Call screen_capture
Next i


End Sub

 

Message 46 of 146
Rafal.Gaweda
in reply to: Anonymous


@Anonymous wrote:

I would like to have the moment My on the view, I suppose it's a command like 

 

mavueRobot.ParamsFeMap.CurrentResult = I_VFMRT_COMPLEX_REINFORCE_TOP_MXX

 

maybe 

 

mavueRobot.ParamsFeMap.CurrentResult = I_VBMRT_NTM_MY

 

VFMRT means ViewFEMapResultsType -> this works for  mavueRobot.ParamsFeMap.CurrentResult 

VBMRT means ViewBarMapResultType

so I guesss you look for :


I_VFMRT_COMPLEX_REINFORCE_TOP_MYY    or 


I_VFMRT_COMPLEX_REINFORCE_BOTTOM_MYY     or


I_VFMRT_DETAILED_MOMENT_YY




Rafal Gaweda
Message 47 of 146
Anonymous
in reply to: Rafal.Gaweda

My project is a Portique Plan with bar so I looking for My (Diagrams).

 

Can you correct my macro ?

 

Do you know the command to clean all the screen captures ?

Message 48 of 146
Rafal.Gaweda
in reply to: Anonymous


mateaus wrote:

My project is a Portique Plan with bar so I looking for My (Diagrams).

 


 

' displaying My diagram
mavueRobot.ParamsDiagram.Set I_VDRT_NTM_MY, True



Rafal Gaweda
Message 49 of 146
Rafal.Gaweda
in reply to: Anonymous


mateaus wrote:

 

Do you know the command to clean all the screen captures ?


 

For i = 1 To robapp.Project.PrintEngine.ScreenCaptures.Count
robapp.Project.PrintEngine.ScreenCaptures.Remove robapp.Project.PrintEngine.ScreenCaptures.Get(1)
Next i



Rafal Gaweda
Message 50 of 146
Anonymous
in reply to: Rafal.Gaweda

Hi this commands don't work

 

mavueRobot.ParamsDisplay.Set I_VDA_STRUCTURE_NODE_NUMBERS = True
mavueRobot.ParamsDisplay.Set I_VDA_STRUCTURE_BAR_NUMBERS = True

Message 51 of 146
Rafal.Gaweda
in reply to: Anonymous

Try this:

 

mavueRobot.ParamsDisplay.Set I_VDA_STRUCTURE_NODE_NUMBERS, True
mavueRobot.ParamsDisplay.Set I_VDA_STRUCTURE_BAR_NUMBERS, True
RobApp.Project.ViewMngr.Refresh



Rafal Gaweda
Message 52 of 146
Anonymous
in reply to: Rafal.Gaweda

It doesn't work

 

error

 

I would like also change the size of symbols like :

 

mavueRobot.ParamsDisplay.SymbolSize = 5

 

This command doesn't change anything.

Message 53 of 146
Rafal.Gaweda
in reply to: Anonymous

I asked you to use this syntax:

 

mavueRobot.ParamsDisplay.Set I_VDA_STRUCTURE_NODE_NUMBERS, True
mavueRobot.ParamsDisplay.Set I_VDA_STRUCTURE_BAR_NUMBERS, True



Rafal Gaweda
Message 54 of 146
Anonymous
in reply to: Rafal.Gaweda

Ok sorry and for the syze of symbols ?

Message 55 of 146
Anonymous
in reply to: Anonymous

Re SymbolSize; is it correct that this only takes an integer, and that the symbolsize represented in Robot is ten times of this?

E.g. SymbolSize = 2 gives a symbol size in robot of 20. 

Similarly SymbolSize = 1.5 gives 20, and SymbolSize = 1.4 give 10.

 

 

Message 56 of 146
Rafal.Gaweda
in reply to: Anonymous


sorgjee wrote:

Re SymbolSize; is it correct that this only takes an integer,

 

symbolsize.jpg

 

and that the symbolsize represented in Robot is ten times of this?E.g. SymbolSize = 2 gives a symbol size in robot of 20. 

Similarly SymbolSize = 1.5 gives 20, and SymbolSize = 1.4 give 10.

 

Yes it is like that. 1 in API coresponds to 10 in Robot.



Rafal Gaweda
Message 57 of 146
Anonymous
in reply to: Anonymous

It doesn't work, can you send me an example ?

 

'mavueRobot.ParamsDisplay.Set I_VDA_STRUCTURE_NODE_NUMBERS = True
'mavueRobot.ParamsDisplay.Set I_VDA_STRUCTURE_BAR_NUMBERS = True
mavueRobot.ParamsDiagram.Set I_VDRT_NTM_FX, False
mavueRobot.ParamsDiagram.Set I_VDRT_NTM_FZ, False
mavueRobot.ParamsDiagram.Set I_VDRT_NTM_MY, False
'mavueRobot.ParamsDisplay.Set I_VDA_ADVANCED_OFFSETS, True
mavueRobot.ParamsDisplay.Set I_VDA_SECTIONS_SHAPE, True
mavueRobot.ParamsDisplay.Set I_VDA_ADVANCED_ELASTIC_FOUNDATION, True 'afficher sol elastique
'mavueRobot.ParamsDisplay.Set I_VDA_FE_PANEL_THICKNESSES, True
'mavueRobot.ParamsDisplay.Set I_VDA_SECTIONS_COLORS, True


mavueRobot.Redraw (0)
mavueRobot.ParamsDisplay.SymbolSize = 2
robapp.Project.ViewMngr.Refresh

 

Message 58 of 146
Rafal.Gaweda
in reply to: Anonymous
Message 59 of 146
Anonymous
in reply to: Rafal.Gaweda

Hi,

 

I'd like to ask in the view this :

 

Reaction Fx

 

How can I make it ?

Message 60 of 146
Rafal.Gaweda
in reply to: Anonymous


I'd like to ask in the view this :

 

Reaction Fx

 

 

Unfortunately it is not implemented in API.

 



Rafal Gaweda

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report