オーナー(親)オブジェクトのオブジェクト ID を取得します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.OwnerID
タイプ: すべての図形オブジェクト、AttributeReference、Block、Blocks、Dictionary、Dictionaries、Dimension、DimStyle、DimStyles、Group、Groups、Layer、Layers、Layout、Layouts、Linetype、Linetypes、Material、Materials、MLeaderStyle、ModelSpace、PaperSpace、PlotConfiguration、PlotConfigurations、RegisteredApplication、RegisteredApplications、SectionManager、SectionSettings、SortentsTable、TableStyle、TextStyle、TextStyles、UCS、UCSs、View、Views、Viewport、Viewports、XRecord
このプロパティが適用されるオブジェクト。
読み込み専用: はい
タイプ: Long_PTR
オブジェクトのオーナーのオブジェクト ID。
追加の注意はありません。
VBA:
Sub Example_OwnerID()
' This example creates an MText object in model space
' and then finds the OwnerID for the object.
Dim MTextObj As AcadMText
Dim corner(0 To 2) As Double
Dim width As Double
Dim text As String
corner(0) = 0#: corner(1) = 10#: corner(2) = 0#
width = 10
text = "This is the text string for the MText object"
' Creates the MText object
Set MTextObj = ThisDrawing.ModelSpace.AddMText(corner, width, text)
ZoomAll
MsgBox "The OwnerID for the MText object is: " & MTextObj.OwnerID
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_OwnerID()
;; This example creates an MText object in model space
;; and then finds the OwnerID for the object.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq corner (vlax-3d-point 0 10 0)
width 10
text "This is the text string for the MText object")
;; Creates the MText object
(setq modelSpace (vla-get-ModelSpace doc))
(setq MTextObj (vla-AddMText modelSpace corner width text))
(vla-ZoomAll acadObj)
(alert (strcat "The OwnerID for the MText object is: " (itoa (vla-get-OwnerID MTextObj))))
)