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 Erase Panels and Assign Properties

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
a54249
515 Views, 6 Replies

API Erase Panels and Assign Properties

Hi,

 

I made an algorithm to erase panels,

      Dim del As irobotobjobjectserver
      del = robapp.Project.Structure.Objects

      For i = 1 To (10) * (10) * 2
        del.Delete(i) 
      Next i

 

 and another to assign thickness,

      For p = 1 To (Count * Count) * 2

        Dim objy As IRobotObjObject
        objy = robApp.Project.Structure.Objects.Get(p)   

        objy.SetLabel(irobotlabeltype.I_LT_PANEL_THICKNESS, Esp)

        objy.Update 

      Next p

is there any way to erase all panels at once, avoiding the use of cycles, like a delete all?
Is it possible to do the same to assign a thickness? select all panels and assign a single value?

 

Thanks in advance

6 REPLIES 6
Message 2 of 7
Rafal.Gaweda
in reply to: a54249

on Selection:

 

RobApp.Project.Structure.Objects.DeleteMany RSelection

RobApp.Project.Structure.Objects.SetLabel RSelection, I_LT_PANEL_THICKNESS, "My thickness"

etc

 



Rafal Gaweda
Message 3 of 7
a54249
in reply to: Rafal.Gaweda

Thanks!

Message 4 of 7
rhlkochar
in reply to: a54249

Hi,

 

I want to ensure that all the objects in the existing model (if any) is deleted in ROBOT, if there is an existing model already. I want this so as to avoid duplication of the model if the user clicks the generate model button on my VBA code twice. 

Message 5 of 7
Rafal.Gaweda
in reply to: rhlkochar

Hi @rhlkochar

 

If you control objects numbers just check if they exist.

I do not see other way except starting "new" model each time you press button 



Rafal Gaweda
Message 6 of 7
rhlkochar
in reply to: Rafal.Gaweda

Hi Rafal,

 

Say I have 14 objects numbered 1 to 14, how do I delete all the objects?

Message 7 of 7
Rafal.Gaweda
in reply to: rhlkochar

@rhlkochar

 

????

make selection and delete them

 

robapp.Project.Structure.Objects.DeleteMany(...)


Rafal Gaweda

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

Post to forums  

Autodesk Design & Make Report