Connection
Connection
Hello
I would like to know if there is a simple way to connect Atom then drag lines form input to output ?
Thank you
I would like to know if there is a simple way to connect Atom then drag lines form input to output ?
Thank you
Re: Connection
I find i use connect
- MatthijsJongboer
- Posts: 200
- Joined: Thursday 11 November, 2010 - 14:12
Re: Connection
Hello Giovanni,
Yes, there is. A lot of atoms have written AutoConnect on the OnCreation Eventhandler. This is a function (defined in the Kernel Functions Atom) to connect atoms that are dragged into the model layout. You can write your own code using the 4DScript command 'Connect'. It's not a simple way but since you ask this question, I expect you are looking for a smarter solution.
Gr. Matthijs
Yes, there is. A lot of atoms have written AutoConnect on the OnCreation Eventhandler. This is a function (defined in the Kernel Functions Atom) to connect atoms that are dragged into the model layout. You can write your own code using the 4DScript command 'Connect'. It's not a simple way but since you ask this question, I expect you are looking for a smarter solution.
Gr. Matthijs
Re: Connection
yep i use the interact window
but i can manage really smart solution because this code doesn´t work:
Do( globalvar([Num],vbvalue,1),
While(Num<10,
do(connect(1,atombyname(concat([Server],string(Num)),Model),Num,atombyname([Crane],Model)),
Num:=Num+1)
I don´t get why (maybe because Num became a vbstring variable)
Thank
but i can manage really smart solution because this code doesn´t work:
Do( globalvar([Num],vbvalue,1),
While(Num<10,
do(connect(1,atombyname(concat([Server],string(Num)),Model),Num,atombyname([Crane],Model)),
Num:=Num+1)
I don´t get why (maybe because Num became a vbstring variable)
Thank
- MatthijsJongboer
- Posts: 200
- Joined: Thursday 11 November, 2010 - 14:12
Re: Connection
Your code seems to be OK.
It will connect the servers in the model named Server1 to Server9. The connection is made from Outpuchannel 1 of each server to inputchannel Num of the Crane.
Num is defined as a vbvalue so your typecast works fine.
When the atoms and channels exist, it should work. Do you get any error messages?
It will connect the servers in the model named Server1 to Server9. The connection is made from Outpuchannel 1 of each server to inputchannel Num of the Crane.
Num is defined as a vbvalue so your typecast works fine.
When the atoms and channels exist, it should work. Do you get any error messages?
- MatthijsJongboer
- Posts: 200
- Joined: Thursday 11 November, 2010 - 14:12
Re: Connection
Your code works for me. Maybe you can attach a model?
Re: Connection
i got the error
because num go from 1 to 67
until 9 i have to use [server0],string(num)
from10 to 67 i have to use [server],string(num)
Thank any way
because num go from 1 to 67
until 9 i have to use [server0],string(num)
from10 to 67 i have to use [server],string(num)
Thank any way
- MatthijsJongboer
- Posts: 200
- Joined: Thursday 11 November, 2010 - 14:12
Re: Connection
I see. I used a few atoms that I created using drag-drop. Then the code works.
Well. I'm glad you found it.
Well. I'm glad you found it.
Re: Connection
do u have an idea how can in 3d visualization leave teh product on the container when they enter in the unpack atom?