Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ETABS VBA Code

Status
Not open for further replies.

RAJAVARDHAN

Structural
Joined
Apr 14, 2024
Messages
2
Location
IN
Hi, I cannot select frames and walls based on section properties in etabs v21 and then delete selected frames and walls. Can anyone suggest to me the code to do it using Excel VBA code?
 
Rajavardhan, I would think a combination of getting selected objects, filtering out frames and areas and then testing for material property types would do the trick.

image1_anjvge.png


image2_jcmgwd.png




S&T
 
I have tried it, but nothing happen

ret = SapModel.GetSelected(NumberItems, 2, 0 - Delete - Beam)

Can you please write those few lines only to select and delete it
 
Hi Raj,

I have not coded in VBA before, but the code in C Sharp needs to look a bit different than what you have shown.
C#:
int NumberItems = 0;
int[] ObjectType = null;
string[] ObjectName = null;
_SapModel.SelectObj.GetSelected(ref NumberItems, ref ObjectType, ref ObjectName);



S&T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top