ghiaguy181 Posted March 12, 2014 Share Posted March 12, 2014 Hi everyone, I was someone might know a way to use data in an excel table to automatically flip or rotate an arrow block 180 degrees. I have alot of data that is in excel showing which direction to move objects to place them where they belong. This data will be updated and therefore the direction to move the object will possibly go back and forth. The only rotation would be 180 degrees so not too complicated. Thank you for any help! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 13, 2014 Share Posted March 13, 2014 You need to supply a lot more information. Are you using OLE ? A lisp to read cell values ? A script made via excel ? A script made via a csv output form excel ? Quote Link to comment Share on other sites More sharing options...
ghiaguy181 Posted March 13, 2014 Author Share Posted March 13, 2014 I believe I am looking for a script made via a csv output from excel. I have found what others have been using the ATTOUT and ATTIN commands however it is not letting me select the blocks with this command. Is this because no attributes are associated with the blocks? I would just like to somehow possibly export the data from autocad, modify the data based on an if then function in excel and then import it back into cad and have the arrows display the correct direction. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 14, 2014 Share Posted March 14, 2014 If your block has no attributes then slightly different way to change direction, taking for granted you know its insertion position x,y the you can search the dwg look for a certain block name, find the insertion point and rotate block accordingly. (defun Roblock (/ x xy) (setq ss1 (ssget "x" '((2 . "blockname")))) (setq x 0) (repeat (sslength) (setq xy (assoc 10 (entget (ssname ss1 x)))) (princ xy) ; do your thing now compare to csv file (setq x (+ x 1)) ) (Roblock) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.