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: 

Display bar length graphically

14 REPLIES 14
Reply
Message 1 of 15
sorgjee
1518 Views, 14 Replies

Display bar length graphically

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

14 REPLIES 14
Message 2 of 15
Rafal.Gaweda
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
Message 3 of 15
Artur.Kosakowski
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
Message 4 of 15
sorgjee
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.

Message 5 of 15
Romanich
in reply to: sorgjee

Hi

Just look at the picture:

mapsonbars.png

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

LinkedIn | Robot & Хобот | App Store for Robot
EESignature


Message 6 of 15
sorgjee
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.

Message 7 of 15
Rafal.Gaweda
in reply to: sorgjee

Unfortunatelly bar.Name is read only attribute.

Yuo can not set it with API.



Rafal Gaweda
Message 8 of 15
Rafal.Gaweda
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
Message 9 of 15
Rafal.Gaweda
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
Message 10 of 15
sorgjee
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.

Message 11 of 15
Rafal.Gaweda
in reply to: sorgjee


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?

 

symbolsize1.jpg

 

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 = 5

viewRobot.ParamsDisplay.Set I_VDA_VIEWOGL_BLACK_EDGES, True
RobApp.Project.ViewMngr.Refresh

 

blackedges.jpg

 



Rafal Gaweda
Message 12 of 15
sorgjee
in reply to: Rafal.Gaweda

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

 

Message 13 of 15
sorgjee
in reply to: sorgjee

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?

Message 14 of 15
Rafal.Gaweda
in reply to: sorgjee


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.



Rafal Gaweda
Tags (1)
Message 15 of 15
Rafal.Gaweda
in reply to: sorgjee


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, False

RobApp.Project.ViewMngr.Refresh

 

 



Rafal Gaweda

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

Post to forums  

Autodesk Design & Make Report