Skip to main content
17-Peridot
March 24, 2023
Question

Remove project dependency

  • March 24, 2023
  • 2 replies
  • 2835 views

Hello Community,

 

I was wondering if there is any way to remove a project dependency programmatically in Thingworx?

 

The situation:

We have one project (Project A) that creates projects (Project B-N) and when it does this, the original project (A) gets this newly created project (B-N) as a dependency. 

I am not quite sure why it gets the created project (B-N) as a dependency though, I have asked my colleagues about it for now to cover all of my bases.

 

But in the meantime, when we want to delete the entire newly created project (B-N), we can delete everything within the project, things and such, but not the project itself because of the dependency on it in project (A).

 

Any ideas in regards to this?

2 replies

15-Moonstone
March 24, 2023

The easy answer is to go to the "General Information" tab of the project and you'll see a section called "Project Dependencies." The should a box with the  dependent project and an X next to the name. If that doesn't work try getting rid of any tags associated with the project, as well. If you're looking for a code solution, you might be able to use the "UpdateProjectDependencies" service in all projects to remove an irrelevant dependency.

jensc17-PeridotAuthor
17-Peridot
March 27, 2023

Hello,

 

Unfortunately I need a way to do this in my code and it seems like the "UpdateProjectDependencies" service just does another check if all the dependencies still exist.

I did try to use the "ListExternalDependencies" service. This listed a whole bunch of dependencies. But what I found so strange was that when running it for the "parent" project, it listed dependencies where the child project was using something from the parent project.

 

I can understand that the child project would have that dependency. But why does the parent project have it as well?

 

After clearing one of my child projects and running the service on it again, I found:

jensc_0-1679901826027.png

With the "whereUsed" as:

jensc_1-1679901862420.png

 

Is it saying that we have a dependency to the "parent" projects, and because of that dependency we can't delete the project?

I'm a bit lost here...

 

Thanks,

Jens

Community Manager
April 11, 2023

Hi @jensc.

 

We're trying to understand the scenario that would result in the requirement to perform the cleanup.  If you are able to eliminate that issue, there would not be a need to perform the cleanup.

 

Can you please provide details of your use case?  It would also be helpful to know which version of ThingWorx you are running.

 

Regards.

 

--Sharon

jensc17-PeridotAuthor
17-Peridot
April 27, 2023

Hello,

 

Not sure why, but this issue doesn't seem to occur anymore.

I can't say that we had done any specific changes because of this issue. But perhaps it had been fixed at some point while building the project.

So, sorry but there will likely not be a good resolution for this.

 

Regards,

Jens