Layout::LinearDimension & Layout::ConnectionPoint & persistent_id

Hi all,

I try this code:

#panel_dimension[:entitys][0] is a vertex

pid_start = panel_dimension[:entitys][0].persistent_id

Layout::ConnectionPoint.new(viewport, start_point_3d, pid_start)

I have this error

wrong argument type (expected String)

after i try to change it to string

pid_start = panel_dimension[:entitys][0].persistent_id&.to_s

Layout::ConnectionPoint.new(viewport, start_point_3d, pid_start)

but I get this error

pid must be valid

if i do without PID , it work well but I ‘m afraid that the connection point will not be update with the vertex

Layout::ConnectionPoint.new(viewport, start_point_3d)


Perhaps using a vertex is too low level?

vertex = panel_dimension[:entitys][0]
pid_start = vertex.parent.persistent_id&.to_s
start_point_3d = vertex.position
Layout::ConnectionPoint.new(viewport, start_point_3d, pid_start)

ok,
Juste one more question , how deep could be the entity ?

I don’t know. Run a test perhaps?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.