https://wiki.gz-labs.net/index.php?title=Vla-get-textfontstyle&feed=atom&action=history
Vla-get-textfontstyle - 版の履歴
2024-03-28T15:20:52Z
このウィキのこのページに関する変更履歴
MediaWiki 1.39.3
https://wiki.gz-labs.net/index.php?title=Vla-get-textfontstyle&diff=6237&oldid=prev
Gizmon: ページの作成:「{{AutoLISP}} ; 構文 : (vla-get-textfontstyle ''vla-object'' ) ; 機能 : 新しい文字のフォント スタイルを取得する。 ; 引数 :* vla-object … P...」
2016-02-06T13:34:28Z
<p>ページの作成:「{{AutoLISP}} ; 構文 : (vla-get-textfontstyle ''vla-object'' ) ; 機能 : 新しい文字のフォント スタイルを取得する。 ; 引数 :* vla-object … P...」</p>
<p><b>新規ページ</b></p><div>{{AutoLISP}}<br />
; 構文<br />
: (vla-get-textfontstyle ''vla-object'' )<br />
<br />
<br />
; 機能<br />
: 新しい文字のフォント スタイルを取得する。 <br />
<br />
<br />
; 引数<br />
:* vla-object … PreferencesDisplay のVLAオブジェクト<br />
<br />
<br />
; 戻り値<br />
: acTextFontStyle 列挙型<br />
::* acFontRegular<br />
::* acFontItalic<br />
::* acFontBold<br />
::* acFontBoldItalic<br />
<br />
<br />
* このプロパティの初期値は acFontRegular。<br />
<br />
<br />
; サンプル<br />
<pre class="brush:autolisp;"><br />
(vl-load-com)<br />
(defun c:Example_TextFontStyle()<br />
;; TextFontStyle を変更するサンプル。<br />
(setq acadObj (vlax-get-acad-object))<br />
(setq preferences (vla-get-Preferences acadObj))<br />
<br />
;; 現在の TextFontStyle 値<br />
(setq currTextFontStyle (vla-get-TextFontStyle (vla-get-Display preferences)))<br />
(setq constant (cond<br />
((= currTextFontStyle acFontRegular) "acFontRegular")<br />
((= currTextFontStyle acFontItalic) "acFontItalic")<br />
((= currTextFontStyle acFontBold) "acFontBold")<br />
((= currTextFontStyle acFontBoldItalic) "acFontBoldItalic")<br />
))<br />
<br />
(alert (strcat "現在の TextFontStyle は " constant))<br />
<br />
;; 変更<br />
(vla-put-TextFontStyle (vla-get-Display preferences) acFontBoldItalic)<br />
(setq newTextFontStyle (vla-get-TextFontStyle (vla-get-Display preferences)))<br />
(setq newConstant (cond<br />
((= newTextFontStyle acFontRegular) "acFontRegular")<br />
((= newTextFontStyle acFontItalic) "acFontItalic")<br />
((= newTextFontStyle acFontBold) "acFontBold")<br />
((= newTextFontStyle acFontBoldItalic) "acFontBoldItalic")<br />
))<br />
(alert (strcat "新しい TextFontStyle は " newConstant))<br />
<br />
;; Reset TextFontStyle to its original value<br />
(vla-put-TextFontStyle (vla-get-Display preferences) currTextFontStyle)<br />
(alert (strcat "TextFontStyle を次に戻しました " constant))<br />
)<br />
<br />
</pre><br />
<br />
-----<br />
関連事項<br />
* [[vlax-get-acad-object]]<br />
* [[vla-get-activedocument]]<br />
* [[vla-put-textfontstyle]]<br />
* [[vla-get-textfontstyle]]<br />
<br />
<br />
[[Category:AutoLISP]]</div>
Gizmon