Moving browser nodes to a new folder

Moving browser nodes to a new folder

Anonymous
Not applicable
634 Views
2 Replies
Message 1 of 3

Moving browser nodes to a new folder

Anonymous
Not applicable

Many of the designs I work on have a number of fasteners in them.  In an attempt to reduce the number of nodes in the "Model" browser pane, I am trying to write a macro that will:

 

1. Check to see if a "Fasteners" folder exists in the "Model" browser.  If none exists one is created.

2. Move all fasteners in the "Model" browser into the new "Fasteners" folder

 

I can detect if the folder exists or not and create one if needed.

I can get a list of all the fasteners I want to move.

 

I can't seem to find the right method to move the fasteners into the new "Fasteners" folder

 

The fasteners are all .ipt files.

 

Within the API these are all BrowserNode Objects.  My approach was to use the AddChild method, to add the BrowserNode Object to the BrowserFolder.BrowserNode object and then use the Delete method to remove the node from the BrowserPane.TopNode.

 

I am getting the following error:

 

Run-time error '438':

 

Object doesn't support this property or method

 

Can anyone point out where I am going wrong in this approach.  Is this even possable to do?

 

Thank you

 

Tim Clift

Cad Drafter

 

Anthro Corporation

10450 SW Manhasset Dr.

Tualatin, OR 97062

 

The only methods available are add and remove

0 Likes
635 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Problem solved.  I am new to VBA and was unaware of the need for the "Call" statement.

Code is working now.

0 Likes
Message 3 of 3

marco_suurlant
Enthusiast
Enthusiast

Hello Tim,

 

I want to do it also but then for CC parts and Library’s parts.

How did you do?

 

Thank you,

Marco

Marco Suurlant

Programmer Engineering
inventor professional 2015
0 Likes