Jump to content
Lee Mac

403 Forbidden

Recommended Posts

CADTutor
7 minutes ago, Lee Mac said:

I'm now receiving the 403 error when attempting to post an embedded link to another post on the forum.

 

When you say "embedded", do you mean like in my post above or something different?

 

Share this post


Link to post
Share on other sites
CADTutor

After a few more tweaks. Testing paulmcz's code:

;;; Measures distance between 2 points, along polyline

(defun c:lm (/ a b d e d1 d2 p pl oecho osn)
  (vl-load-com)
  (command "cmdecho" (getvar "cmdecho"))
  (setq oecho (getvar "cmdecho")
	osn (getvar "osmode"))
  (setvar "cmdecho" 0)
  (setq e (entsel "\n Select polyline to measure on: ")
	pl (car e))
  (if e
  (cond	((= (setq p (cdr (assoc 0 (entget (car e))))) "LWPOLYLINE")
	 ;(setvar "osmode" 2)
	 (setq a  (getpoint "\n Select first point on polyline: ")
	       b  (getpoint "\n Select second point on polyline: ")
	       d1 (vlax-curve-getDistAtPoint pl a)
	       d2 (vlax-curve-getDistAtPoint pl b)
	       d  (abs (- d1 d2))
	 )
	 (princ (strcat "\n Distance = " (rtos d 2 5)))
	)
	(t (alert "Selected object is not a polyline"))
  )(alert "Nothing selected"))
  (setvar "osmode" osn)
  (setvar "cmdecho" oecho)
  (princ)
)

OK, that seems to have worked.

 

Please use this thread to post other code snippets so we can make sure it will work more generally - thanks.

Share this post


Link to post
Share on other sites
CADTutor

There is some background to this. The web hosting company are implementing tougher security measures to keep sites like CADTutor safer from exploits like cross site scripting. However, the new security measures need to be tweaked to differentiate between "good" code and "bad" code in an attempt to find the right balance between security and usability. I think we are now close to having this sorted out but please post in this topic to report any 304 errors that you see and let me know what you were trying to post when the error occurred.

  • Like 1

Share this post


Link to post
Share on other sites
paulmcz

OK, I am testing again:

(defun c:mc (/ a b c f f0 f1 d d1 d2 e1 n oerr osn oecho)

  (setq oecho (getvar "cmdecho")
        osn   (getvar "osmode"))
  (setvar "cmdecho" 0)

  (setq	f1 (entsel "\n Select circle to copy props + diameter from: ")
	f0 (entget (car f1))
	f  (cdr (assoc 40 f0))
	c  (cdr (assoc 0 f0))
  )
  (redraw (car f1) 3)
  (if (equal c "CIRCLE")()(^C^C))
  (princ "\n Select circles to change: ")
  
  (setq a (ssget '((0 . "circle")))	; filters in circles only
        d (sslength a)			; = number of circles in ss
        d1 d)
  (repeat d
    (setq d2 (1- d1)
          n  (ssname a d2)		; = last entity in ss
          e1 (entget n))
    (entmod (subst
	       (cons 40 f); f= new radius
	       (assoc 40 e1)
	       e1
	     )
    )
    (setq d1 d2)
  )
  (command "matchprop" f1 a "")
  (setvar "osmode" osn)
  (setvar "cmdecho" oecho)
  (princ)
)

 

Share this post


Link to post
Share on other sites
paulmcz

It seems to work all right.

Share this post


Link to post
Share on other sites
Lee Mac
4 hours ago, CADTutor said:

 

When you say "embedded", do you mean like in my post above or something different?

 

 

Like this -

But it appears to be fixed now :)

Edited by Lee Mac
  • Like 1

Share this post


Link to post
Share on other sites
BIGAL

I got the error when I tried posting a youtube Http link it was about leaders and balloons, it opened the link then gave the 403 error message. Does the lisp code posted  have a http link like 

a www cadtutor net / forum / 68778 …….. etc in it spaces added so its text.

Share this post


Link to post
Share on other sites
BIGAL

The emoji do not appear to be working it goes to a blank screen with grey squares no images, type :lol and it worked ? Stops working as well.

Share this post


Link to post
Share on other sites
rkmcswain

😎

💰

 

Seems to be working here.

 

 

v3420m1.png

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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