Jump to content

Recommended Posts

Posted

This post is very similar to what I intended with rotating blocks by first determining True North and then new azimuth from true north (I succeeded in doing that one no perfectly but it does most of what I wanted). I did try, in the past to obtain some dxf entities from blocks but am clueless when I look at the result. I would like to see, in each drawing file: set an arrow block to North then with a magical lisp each time I enter the command I would like the an insert of the block with inputting new degree from the North to be inserted.

and to top it off, if there is a way for the degree to show up on the #### that would be excellent.

I also cannot figure out an efficient way to flip the text so it always shows the text correctly but that is another problem.

 

Is there anyone that can cook something up for me please?

in the past, BIGAL had helped me a lot in determining my block rotation but this seems it has a lot of DXF entity I cannot figure out!

I played around with this lisp but cannot do much!


(vl-load-com)

(defun c:IR ( / centro angR Fr obj)
  (setq centro (getpoint "\nSelect Block Insertion Point : ")
        angD (getreal "\nEnter Rotation Angle for Block in Degrees : ")
        Fr (getstring "\nEnter Force applied : ")
        angR (* pi (/ angD 180.0))
  );end_setq
  (command "_-insert" "r" "_s" "1" centro (angtos angR) Fr (strcat (angtos angR) "%%d"))
	(setq obj (vlax-ename->vla-object (entlast)))
	(if (< (/ pi 2) angR (* (/ pi 2) 3))
          (foreach prop (vlax-invoke obj 'getdynamicblockproperties)
            (if (= (strcase (vla-get-propertyname prop)) "????")
              (vla-put-value prop (vlax-make-variant 180.0 (vlax-variant-type (vla-get-value prop))))
            );end_if
          );end_foreach            
  );end_if
  (princ)
);end_defun
(princ)

 

Thank you

 

image.png.cd063af02f14e7b663691c6021105a1f.png

Arrows.dwg

Posted (edited)

The only way I can seem to insert blocks at a adjusted  angle is using UCS. I just use UCS ob with a line at correct angle this becomes zero angle. Ps pick left end.

Edited by BIGAL

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