Discussion Groups

Robot Structural Analysis

Reply
Active Contributor
sorgjee
Posts: 49
Registered: ‎12-11-2011

Display bar length graphically

463 Views, 14 Replies
12-12-2011 07:15 AM

Hi,

 

Is there any way of displaying the bar lengths graphically on the screen through the current display options implemented in Robot?

 

This is primarily for the element length, but if possible to dusplay minor and or major axis buckling lengths that would be very useful as well.

 

If not possible directly in Robot, is there a way of using a VBA macro to have the API generate a custom display option?

 

Thanks

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

Re: Display bar length graphically

12-12-2011 07:40 AM in reply to: sorgjee

sorgjee wrote:

 

Is there any way of displaying the bar lengths graphically on the screen through the current display options implemented in Robot?

 

Not possile.

Only when you hoover mouse over bar you can check bar length on robot status bar:

 

len.jpg

 

This is primarily for the element length, but if possible to dusplay minor and or major axis buckling lengths that would be very useful as well.

 

Turn on LCS display - only.

 

If not possible directly in Robot, is there a way of using a VBA macro to have the API generate a custom display option?

 

UNfortunatelly not possible.

 

 

 



Rafal Gaweda
Please use plain text.
Product Support
Artur.Kosakowski
Posts: 4,832
Registered: ‎12-17-2010

Re: Display bar length graphically

12-12-2011 08:17 AM in reply to: sorgjee

Sorgjee,

 

Mind that a buckling length is not the definition that returns a single value for the whole bar. Using more advanced definition of the parameters this depends on where the verification point is actually located. In addition there are two other options to check what the bar length is.

 

 



Artur Kosakowski
Please use plain text.
Active Contributor
sorgjee
Posts: 49
Registered: ‎12-11-2011

Re: Display bar length graphically

12-12-2011 08:44 AM in reply to: Artur.Kosakowski

Rafel/Artur,

 

Thanks for the feedback, but unfortunately displaying the length on-screen is not sufficient. We need to output illustrations for a large number of trusses, showing the length of the individual members.

 

Assuming the name of the elements be set to a value that does not include the bar number when using the API, do you think it would be possible take a collection of all the bars in the model, loop through them and do set bar(i).Name = bar(i).Length & "m" (or is this impossible if Name is ReadOnly)? Once this is done, the normal display showing bar names should output it.

Please use plain text.
*Expert Elite* | International Moderator
Romanich
Posts: 565
Registered: ‎09-29-2009

Re: Display bar length graphically

12-12-2011 09:28 AM in reply to: sorgjee

Hi

Just look at the picture:

mapsonbars.png

   
Please use plain text.
Active Contributor
sorgjee
Posts: 49
Registered: ‎12-11-2011

Re: Display bar length graphically

12-12-2011 11:14 AM in reply to: Romanich

Bingo! Give the man a sweet. :-)

 

Not an ideal solution, but a good workaround to the main problem. Have to reset the scale continuously for some reason, but otherwise working.

 

Thanks.

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

Re: Display bar length graphically

12-13-2011 12:30 AM in reply to: sorgjee

Unfortunatelly bar.Name is read only attribute.

Yuo can not set it with API.



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

Re: Display bar length graphically

12-13-2011 12:56 AM in reply to: Rafal.Gaweda

API code to display what Romanich suggested:

 

Dim viewRobot As IRobotView3 ' this is important to set IRobotView3 if you want to make screen capture of this view

 

' Set viewRobot = RobApp.Project.ViewMngr.CreateView(1) 

Set viewRobot = RobApp.Project.ViewMngr.GetView(1) ' it seems CreateView makes strange affect, use GetView instead

 

viewRobot.ParamsBarMap.CurrentResult = I_VBMRT_DESIGN_MEMBER_LENGTH
viewRobot.ParamsBarMap.Descriptions = I_VDDT_TEXT

viewRobot.ParamsDisplay.SymbolSize = 3
RobApp.Project.ViewMngr.Refresh



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

Re: Display bar length graphically

12-13-2011 01:47 AM in reply to: Rafal.Gaweda

KInd of workaround - generating and assigning section names=bar lengths

(do it on dummy model or re-assign correct sections at the end)

 

 

Dim RLabel As RobotLabel
Dim OriginalSectionName() As String
Dim BLen As String
Dim RBar As RobotBar
Dim BarCollection As RobotBarCollection

Set BarCollection = RobApp.Project.Structure.Bars.GetAll

ReDim OriginalSectionName(BarCollection.Count) As String

For I = 1 To BarCollection.Count

Set RBar = BarCollection.Get(I)
BLen = Str(RBar.Length)
OriginalSectionName(I) = RBar.GetLabelName(I_LT_BAR_SECTION)

Set RLabel = RobApp.Project.Structure.Labels.Create(I_LT_BAR_SECTION, BLen)

RobApp.Project.Structure.Labels.Store RLabel
RBar.SetLabel I_LT_BAR_SECTION, BLen

Next I

 

Dim viewRobot As IRobotView3

Set viewRobot = RobApp.Project.ViewMngr.GetView(1)
viewRobot.ParamsDisplay.Set I_VDA_SECTIONS_NAME, True
RobApp.Project.ViewMngr.Refresh

 

'make screen capture or whatever here on this display


'restoring original names

 

For I = 1 To BarCollection.Count

BarCollection.Get(I).SetLabel I_LT_BAR_SECTION, OriginalSectionName(I)

Next I

RobApp.Project.ViewMngr.Refresh

 



Rafal Gaweda
Please use plain text.
Active Contributor
sorgjee
Posts: 49
Registered: ‎12-11-2011

Re: Display bar length graphically

12-13-2011 02:38 AM in reply to: Rafal.Gaweda

Thanks, the code for the mapping works for me, except the symbol size is refusing to change frmo anyting other than 3. ANy idea what is causing this?

 

Is there a way of setting the scale colours to black through the API? Trying to make the print as neat as possible.

Please use plain text.