Jump to content

Command does not work with DLC?


Anushka

Recommended Posts

I'm trying to apply an action to a button to insert a block, but I get an error exception in veval-str+ arx command unhandled

Can someone help me solve the problem?

subfunction and how am i applying the action

(defun Inblk ( name* tag1 tag2 )
  (if (not (tblsearch "BLOCK" name*))
    (command "_insert" name* pause "" "" "" tag1 tag2)
  )
)
"        : butt { key = \"bt01\"; label = \"9.300\";  }"
(action_tile "bt01"  "(Inblk \"D_Poste\"\"9/300\" nil ) (done_dialog 1)")

 

Link to comment
Share on other sites

7 minutes ago, dlanorh said:

You are trying to run a command ("_insert") inside a modal dialog.

 

it's a problem?

vla-SendCommand  it works ?

Edited by Anushka
Link to comment
Share on other sites

1 hour ago, Anushka said:

 

it's a problem?

vla-SendCommand  it works ?

 

No. Nothing works unless the form is hidden as @rkmcswain alluded to above. The "form" is Modal. Nothing will work until it hidden or ended.

 

Are you collecting the exit state from the dialog, as you're using (done_dialog 1). I collect it by using (setq x_val (start_dialog))

 

Then change

 

(action_tile "bt01"  "(Inblk \"D_Poste\"\"9/300\" nil ) (done_dialog 1)")

 

to

 

(action_tile "bt01"  "(done_dialog 1)")

and after unloading the dialog

 

(cond ( (= x_val 1) (Inblk "D_Poste" "9/300" "")))

You cannot set an attribute 'TEXTSTRING value to nil, it will error so you send it the null string ""

 

If you are doing several block you can store the values in strings

 

eg

 

(action_tile "bt01"  "(progn (setq blk \"D_Poste\" t1 \"9/300\" t2 "") (done_dialog 1))")

Then

 

(cond ( (= x_val 1) (Inblk blk t1 t2)))

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...