Validates a given URL.
Signature
VBA : RetVal =
object.IsURL(URL)
VL : RetVal = (vla-IsURL
object URL)
(vla-IsUrl util "http://www.afralisp.com")
-
Object : Utility
The object or objects this method applies to.
-
LocalFile :
String; input-only
The URL to validate.
-
RetVal : Boolean
TRUE: The string represents a valid URL.
FALSE: The string is not a valid URL.
Remarks
The definition of a
"valid" URL is application-dependent, in that a given 3rd
party application may not be interested in supporting all Internet
protocols. For instance, an application that attempts to connect users
to Web sites would probably not need to provide access to FTP sites. In
this hypothetical application, a FALSE value would be returned if a URL
that begins with something other than "http://" was entered.
The default functionality
of this method for AutoCAD supports FTP, HTTP, HTTPS, and FILE
protocols.
Example :
(defun c:al-isurl ()
(vl-load-com)
(setq util (vla-get-utility
(vla-get-activedocument
(vlax-get-acad-object))))
(setq flag (vla-IsUrl util "http://www.afralisp.com"))
(princ flag)
(princ)
);defun
|
|