Jump to content

Vla-sendcommand with a reactor??


Lt Dan's legs

Recommended Posts

I am trying to figure out a way to add an object to a dynamic block (flip parameter). If you watch the video within reactor.zip you will see the

Dynamic Door block.

 

I just want to know two things

1. Is vla-sendcommand "bedit" the only way to access the Action Entities?

2. is vla-sendcommand stupid idea within an object reactor?

 

PS I know doing a 3d door would solve my problem but I work with old guys and they refuse to stray away from 2d.

 

 

reactor.zip

Edited by Lt Dan's legs
Link to comment
Share on other sites

Hi,

 

Watched the video and I look forward to seeing the end result.

 

I think what you're looking for is the 'vla-getDynamicBlockProperties' method. It's use may require that you staple a dictionary to either each block or the collection of the two blocks and text field.

 

I wouldn't recommend using the vla-sendCommand, any task you can comprehend that implements it can be done using the vl* methods without it.

 

Hope this helps,

SOliver

Link to comment
Share on other sites

Watched the video and I look forward to seeing the end result.

 

test.zip

 

I'll just have to do this as a command custom command

 

I had to use command calls to do it :(

Link to comment
Share on other sites

Hi,

I think what you're looking for is the 'vla-getDynamicBlockProperties' method.

 

Actually, I was looking for this (see below). You cannot add an object to the action entity this way.

 

Anyone know how? I want to avoid using (command "_.bedit" etc.

 

 

;if flag = t

;will return a list of action parameter's as entities

;if flag= nil

;will return an entity list of "ACAD_EVALUATION_GRAPH"

;;example: (evalgraph "door" t) ;| or |; (evalgraph "door" nil)

(defun EvalGraph ( blockname flag / l eg )
 (if 
   (and (setq l (vla-item (vla-get-blocks (ad)) blockname))
     (eq :vlax-true (vla-get-HasExtensionDictionary l))
   )
   (vlax-for x (vla-GetExtensionDictionary l)
     (if (eq "AcDbEvalGraph" (vla-get-ObjectName x))
       (setq eg
         (
           (lambda ( g )
             (if flag 
               (mapcar (function cdr)
                 (vl-remove-if-not 
                   (function 
                     (lambda ( x ) 
                       (eq (car x) 360)
                     )
                   ) g
                 )
               ) g
             )
           ) (entget (vlax-vla-object->ename x))
         )
       )
     )
   )
 ) eg
)

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...