PDA

View Full Version : Error message in lisp coding for assembly relation


lanse
08-23-2005, 05:00 PM
Dear all,

I'm using lisp coding to create a coincidentan in assembly relation. but there is alwasy an error message displayed " Illegal call to action routine."

My coding is as below,
(defun p-coincide-parts (p_name p_relation p_face1 p_face2)(let()
(sd-call-cmds (assembly_relation :COINCIDENT
:FIRST_REF p_face1
:SECOND_REF p_face2
:name p_name
:NORMALS_OPPOSITE
:auto-solve :YES COMPLETE
)
)
))
where, p_face1 and p_face2 are two element (plane), p_name relation name. I activated a assembly relation set "p_relation" to be current relation set.

I also used "create_relation" command, but got the same result.


Who can help me to the reason why I got this result. My research has been stopped by this problem as my coding couldn't continue.

thanks for any reply.

lanse

Markus
08-23-2005, 10:03 PM
Hello Lanse,

how do you call your function? You must call your function from within a sd-defdialog. This is also more or less the only supported way to get the face sel_items etc. The error message you get actually comes from your sd-call-cmds call, because you obviously did not call your function inside a dialog. Please read the documentation about sd-call-cmds and sd-defdialog.

Markus

lanse
08-25-2005, 05:33 PM
Dear Markus,

Thanks for your reply.
I have solved the problem. In SD 2005, there are two different relation types. I tried many times and found a resolution to solve this problem.

The help desk in SD2005 is not completed. Command index is needed from Cocreate that is easy for us to refer to.

thanks again.
lanse

Michael Kahle
08-26-2005, 03:46 AM
Try to enter

(oli:sd-online-reference)

into the command line - it will provide you the command reference.