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
@Anonymous 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:
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.
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.
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.
Hi
Just look at the picture:
Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.
Roman Zhelezniak
Robot Evangelist & Passionate Civil Structural Engineer
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.
Unfortunatelly bar.Name is read only attribute.
Yuo can not set it with API.
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
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
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.
sorgjee wrote:
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?
(Keep in mind that this approach may not display member lengths on all members - take a look at Romanich screen shot)
Do you refresh after?
Is there a way of setting the scale colours to black through the API?
I am afradi not possible.
Trying to make the print as neat as possible.
Try this code :
viewRobot.ParamsBarMap.CurrentResult = I_VBMRT_DESIGN_MEMBER_LENGTH
viewRobot.ParamsBarMap.Descriptions = I_VDDT_TEXT
viewRobot.ParamsBarMap.MapThicknessCoeff = 1
viewRobot.ParamsDisplay.SymbolSize = 5viewRobot.ParamsDisplay.Set I_VDA_VIEWOGL_BLACK_EDGES, True
RobApp.Project.ViewMngr.Refresh
Hi Rafal,
Thanks _BLACK_EDGES works a treat.
No idea about why the SymbolSize is not working . Was running smoothly last night. Will try different computer and see if it makes any difference.
One more question though, after setting BarMap, how do I revert to a 'normal' view. Using ParamsBarMap.CurrentResult - I_VBMRT_NOTHING simply makes the bars disappear completely.
Regards,
Even
I tried SymbolSize on a different computer (with RSA2012), and it worked fine. Still no luck on this computer, which has RSA2011 installed. The reference manual indicate that this function was introduced fairly early so should work. Any idea?
sorgjee wrote:
I tried SymbolSize on a different computer (with RSA2012), and it worked fine. Still no luck on this computer, which has RSA2011 installed. The reference manual indicate that this function was introduced fairly early so should work. Any idea?
You are right. On 2011 the change of this parameter makes no difference on display.
Works fine on 2012.
One more question though, after setting BarMap, how do I revert to a 'normal' view. Using ParamsBarMap.CurrentResult - I_VBMRT_NOTHING simply makes the bars disappear completely.
This should work:
viewRobot.ParamsBarMap.Descriptions = I_VDDT_NONE
viewRobot.ParamsBarMap.CurrentResult = -1
viewRobot.ParamsDisplay.Set I_VDA_VIEWOGL_BLACK_EDGES, FalseRobApp.Project.ViewMngr.Refresh
Can't find what you're looking for? Ask the community or share your knowledge.