各位专家好,

我需要一些帮助。:slightly_smiling_face:

使用“移除语句”在循环中移除装配步骤很容易:移除语句

image

但是,有没有办法在循环中构建装配步骤呢?
image

当我尝试在循环内构建装配时,会出现以下错误:

Output #1::ProcessExecutor::Output #1::Construct error:
Expected process variable "__visual_Tray_CAPs__" to have value type "Ref<Product>"
but the type is "List<Ref<Product>>".

有没有人之前遇到过这个问题,或者知道如何在循环中正确构建装配步骤?

提前感谢。

听起来是同样的问题,CAP变量会自动变成一个列表。

谢谢你,Tsy。当我添加一个赋值语句构造语句后的 移除已接受 ! 你知道移除已接受是做什么的吗? 当我检查时,每个循环的CAP总是从第一步开始组装 图片 780×717 113 KB TSy 2026年2月6日 上午6:05 4 构造语句的属性在此处有文档记录。 另外据我所知,它不是用于填充现有装配体(为此你需要使用TransportIn),而是每次创建一个新的装配体。 kittellm 2026年2月6日 下午3:07 5 我可能误解了你的设计意图,但我想你可以通过装配体更轻松地实现这个功能: 如何完成装配或拆卸任务 | Visual Components Academy 1个赞Constructstatement without checkingRemoveAccepted!

Do you know whatRemoveAccepteddoes?
When I check it, the CAP is always assembled from the first step for each loop:thinking:

The Construct statement properties are documented here.
Also as far as I know it is not for filling an existing assembly (you need TransportIn for that) but creates a new assembly every time.

I may be misinterpreting your design intent, but I think you may be able to achieve this more easily with an assembly:

How to complete an Assembly or Disassembly Task | Visual Components Academy

1 Like