Hyperlink オブジェクトの、名前の付いた位置を指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: 文字列
Hyperlink オブジェクトのための名前の付いた位置を表す文字列。
このプロパティは、AutoCAD の名前の付いたビューやワード処理プログラム(ワープロ)のブックマークなどの一定の位置を指定します。AutoCAD 図面のジャンプ先の名前の付いたビューを指定すると、ハイパーリンクが開かれたときに AutoCAD は該当のビューを復元します。モデル空間で作成されたビューは[モデル]タブで呼び出されます。ペーパー空間で作成されたビューは最後にアクティブだったレイアウト タブで呼び出されます。
VBA:
Sub Example_URLNamedLocation() ' This example creates a Circle object in model space and ' adds a new Hyperlink to its Hyperlink collection Dim Hyperlinks As AcadHyperlinks Dim Hyperlink As AcadHyperlink Dim circleObj As AcadCircle Dim centerPoint(0 To 2) As Double Dim radius As Double Dim HLList As String ' Define the Circle object centerPoint(0) = 0: centerPoint(1) = 0: centerPoint(2) = 0 radius = 5# ' Create the Circle object in model space Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius) ThisDrawing.Application.ZoomAll ' Get reference to the Circle's Hyperlinks collection Set Hyperlinks = circleObj.Hyperlinks ' Add a new Hyperlink complete with all properties Set Hyperlink = Hyperlinks.Add("AutoDesk") Hyperlink.URL = "www.autodesk.com" Hyperlink.URLDescription = "Autodesk Main Site" Hyperlink.URLNamedLocation = "MY_LOCATION" ' Read and display a list of existing Hyperlinks and ' their properties for this object For Each Hyperlink In Hyperlinks HLList = HLList & "____________________________________" & vbCrLf ' Separator HLList = HLList & "URL: " & Hyperlink.URL & vbCrLf HLList = HLList & "URL Description: " & Hyperlink.URLDescription & vbCrLf HLList = HLList & "URL Named Location: " & Hyperlink.URLNamedLocation & vbCrLf Next MsgBox "The circle has " & Hyperlinks.count & " Hyperlink: " & vbCrLf & HLList End Sub
Visual LISP:
(vl-load-com) (defun c:Example_URLNamedLocation() ;; This example creates a Circle object in model space and ;; adds a new Hyperlink to its Hyperlink collection (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define the Circle object (setq centerPoint (vlax-3d-point 0 0 0) radius 5) ;; Create the Circle object in model space (setq modelSpace (vla-get-ModelSpace doc)) (setq circleObj (vla-AddCircle modelSpace centerPoint radius)) (vla-ZoomAll acadObj) ;; Get reference to the Circle's Hyperlinks collection (setq Hyperlinks (vla-get-Hyperlinks circleObj)) ;; Add a new Hyperlink complete with all properties (setq Hyperlink (vla-Add Hyperlinks "Autodesk")) (vla-put-URL Hyperlink "www.autodesk.com") (vla-put-URLDescription Hyperlink "Autodesk Main Site") (vla-put-URLNamedLocation Hyperlink "MY_LOCATION") ;; Read and display a list of existing Hyperlinks and ;; their properties for this object (setq HLList "") (vlax-for Hyperlink Hyperlinks (setq HLList (strcat HLList "____________________________________" ;; Separator "\nURL: " (vla-get-URL Hyperlink) "\nURL Description: " (vla-get-URLDescription Hyperlink) "\nURL Named Location: " (vla-get-URLNamedLocation Hyperlink))) ) (alert (strcat "The circle has " (itoa (vla-get-Count Hyperlinks)) " Hyperlink: \n" HLList)) )