Preprocessing

Preprocessing

Deleting parameters from Spaceclaim does not seem to delete them from Workbench

Tagged: 

    • nicolicfs
      Subscriber

      I'm relatively new to Ansys products. I'm trying to do a parameter study using Spaceclaim and Workbench.

      I created a couple geometry parameters in Spaceclaim. Then I deleted them, and recreated them with the same names. I did this a few times as I was building my model. Unfortunately, it seems that the Parameter Set in Workbench seems to remember the deleted parameters. How do I refresh Workbench so it only has the parameters that are currently in Spaceclaim?

    • nicolicfs
      Subscriber
      Oh no.... I tried to modify one of the parameters in Workbench, then refreshed the geometry. I received this error. Maybe it's related?
      System.ArgumentException: An item with the same key has already been added.
      at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
      at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
      at Ansys.DesignModeler.Core.Queries.GetParametersQuery.Execute(IQueryContext context)
      at Ansys.Core.Commands.Concurrency.QueryWorkUnit.executeInContext(CommandContext subContext, IExecutionEngineCallback tracer)
      at Ansys.Core.Commands.Concurrency.BaseWorkUnit.doExecute(IExecutionEngineCallback executionEngine, CommandContext subContext)
      at Ansys.Core.Commands.Concurrency.BaseWorkUnit.Execute(IExecutionEngineCallback executionEngine, Boolean dontCatchExceptions)
      --- Ansys.Core.Commands.CommandFailedException: An item with the same key has already been added.
      CommandName: DesignModeler.DesignModelerParameterQuery(QueryContainer="Geometry 2")
      at Ansys.Core.Commands.CommandAsyncResult.RethrowFailureException(Exception e)
      at Ansys.Core.Commands.CommandAsyncResult.Wait(Int32 milliSecondsTimeout, Boolean exitContext)
      at Ansys.DesignModeler.Core.Queries.GetParametersQuery.InvokeAndWait(IQueryContext context, DataContainerReference QueryContainer, String paramName)
      at Ansys.DesignModeler.Core.Addin.PushParametersToGeometryEditor(IFullContext context, DataReference geometryDataObjectRef)
      at Ansys.DesignModeler.Core.Commands.RefreshGeometry.Execute(IFullContext context)
      at Ansys.Core.Commands.Concurrency.CommandWorkUnit.executeInContext(CommandContext subContext, IExecutionEngineCallback tracer)
      at Ansys.Core.Commands.Concurrency.BaseWorkUnit.doExecute(IExecutionEngineCallback executionEngine, CommandContext subContext)
      at Ansys.Core.Commands.Concurrency.BaseWorkUnit.Execute(IExecutionEngineCallback executionEngine, Boolean dontCatchExceptions)
      --- Ansys.Core.Commands.CommandFailedException: An item with the same key has already been added.
      CommandName: DesignModeler.RefreshGeometry(Container="Geometry 2")
      at Ansys.Core.Commands.CommandAsyncResult.RethrowFailureException(Exception e)
      at Ansys.Core.Commands.CommandAsyncResult.Wait(Int32 milliSecondsTimeout, Boolean exitContext)
      at Ansys.DesignModeler.Core.Commands.RefreshGeometry.InvokeAndWait(IProtectedContext context, DataContainerReference Container)
      at Ansys.DesignModeler.GUI.EditGeometry.Invoke(GuiOperationContext context)
      at Ansys.UI.GuiOperationContext.Invoke(GuiOperationMetaData operationData)
      at Ansys.UI.UIManager.InvokeOperationCore(String pseudoname, OperationDelegate callback, Boolean allowOSMessages, Boolean coreTransaction, Boolean deferredRefreshOnly)

    • pilotNodes
      Subscriber
      I am getting the same issues. I wish somebody could address this, it would be of immense help!
    • tryoung2
      Subscriber
      I found that if you go to the variable that you are using for the input parameter and then uncheck the "use as input parameter" checkbox, save the project, then go back and check the checkbox and it should clear up the unused parameter.
      I also found that in the case where you delete an expression or variable that you used as an input parameter it will not delete it from the Workbench parameters list. To get around this, remake the variable that you deleted, i.e. if you deleted a variable, that we'll call X1, that was an input parameter, remake the variable X1 but this time don't check the "use as input parameter" checkbox, save the project, and it will be deleted from your parameter list in Workbench. Then you can go back and delete the variable again.
    • MadScientist
      Subscriber
      Does this work in 2021R2? The option of "use as input parameter", I've seen it in Fluent. The only other close option that I see in the Properties of Outline under the Parameter Set tab, is the Usage option, as seen below, and it is greyed out
      And it is not part of any expression.
Viewing 4 reply threads
  • You must be logged in to reply to this topic.