Vla-addtext

提供:GizmoLabs - だいたい CAD LISP なサイト
構文
(vla-addtext vla-object String InsertionPoint Height)


機能
単一行の文字列を作成する。


引数
  • vla-object … vlaオブジェクト(ModelSpace、PaperSpace、Block のコレクション)
  • String … 文字列
  • InsertionPoint … 挿入点
  • Height … 文字高さ


戻り値
作成した文字列の VLAオブジェクト


サンプル
(defun c:my-addText ()
  (setq *ActDoc* (vla-get-ActiveDocument (vlax-get-Acad-Object)))
  (setq mspace (vla-get-modelspace *actdoc*))
  (setq pt1 (getpoint "\n挿入点: "))
  (setq str (getstring T "\n文字列 : "))
  (setq ht (getreal "\n高さ : "))
  (setq rettxt (vla-addtext mspace str
                             (vlax-3d-point pt1) ht))
(princ)
) ;_defun

;ダンプ
(vlax-dump-object rettxt)
#<vlax-vbObject IGcadText 21040abc> 
;PROPERT:
; Alignment = 0 
; Application (RO) = #<vlax-vbObject IGcadApplication 0f0d2cbc> 
; Backward = vlax-false 
; color = 256 
; Database (RO) = #<vlax-vbObject IGcadDatabase 274a3908> 
; Document (RO) = #<vlax-vbObject IGcadDocument 0f25fe3c> 
; EntityName (RO) = "AcDbText" 
; EntityType (RO) = 32 
; Handle (RO) = "63F" 
; HasExtensionDictionary (RO) = vlax-false 
; Height = 60.000000 
; HorizontalAlignment = 0 
; Hyperlinks (RO) = #<vlax-vbObject IGcadHyperlinks 272b63f0> 
; InsertionPoint = #<vlax-vbArray ... > 
; Layer = "0" 
; Linetype = "ByLayer" 
; LinetypeScale = 1.000000 
; Lineweight = -1 
; Material = "" 
; Normal = #<vlax-vbArray ... > 
; ObjectID (RO) = 659175560 
; ObjectName (RO) = "AcDbText" 
; ObliqueAngle = 0.000000 
; OwnerID (RO) = 551071392 
; PlotStyleName = "ByLayer" 
; Rotation = 0.000000 
; ScaleFactor = 1.000000 
; StyleName = "Standard" 
; TextAlignmentPoint = #<vlax-vbArray ... > 
; TextGenerationFlag = 0 
; TextString = "12345678" 
; Thickness = 0.000000 
; TrueColor = #<vlax-vbObject IGcadAcCmColor 274a3978> 
; UpsideDown = vlax-false 
; VerticalAlignment = 0 
; Visible = vlax-true 



関連事項