Ik maak met lips een mleaderstyle aan.
Ik wil graag weten hoe dat ik het vinkje krijg bij "Always left justify".
Dit is te benaderen via commando "MLEADERSTYLE" en dan tabblad "Content", maar ik wil dat het gelijk ingesteld wordt. Dit is nu met de code hieronder niet het geval.
Dit is een stukje code wat ik gebruik:
(vla-put-ColorIndex co tc)
(vlax-put-property mls 'TextColor co) ; stel de textcolor in
(vla-put-ColorIndex co lc)
(vlax-put-property mls 'LeaderLineColor co) ; stel de LeaderLineColor in
;(vla-put-LeaderLineColor mls co)
(vlax-put-property mls 'AlignSpace 1.8)
(vlax-put-property mls 'Annotative 0)
(vlax-put-property mls 'ArrowSize 2.5)
(vlax-put-property mls 'BlockConnectionType 0)
(vlax-put-property mls 'BlockRotation 0.0)
(vlax-put-property mls 'BlockScale 1.0)
(vlax-put-property mls 'BreakSize 3.75)
(vlax-put-property mls 'ContentType 2)
(vlax-put-property mls 'Description mlsn)
(vlax-put-property mls 'DoglegLength 6.0)
(vlax-put-property mls 'DrawLeaderOrderType 0)
(vlax-put-property mls 'DrawMLeaderOrderType 1)
(vlax-put-property mls 'EnableBlockRotation -1)
(vlax-put-property mls 'EnableBlockScale -1)
(vlax-put-property mls 'EnableDogleg -1)
(vlax-put-property mls 'EnableFrameText 0)
(vlax-put-property mls 'EnableLanding -1)
(vlax-put-property mls 'FirstSegmentAngleConstraint 0)
(vlax-put-property mls 'LandingGap 0.9)
(vlax-put-property mls 'LeaderLineType 1)
(vlax-put-property mls 'LeaderLineTypeId "Continuous")
(vlax-put-property mls 'LeaderLineWeight -1)
(vlax-put-property mls 'MaxLeaderSegmentsPoints 2)
(vlax-put-property mls 'name mlsn)
(vlax-put-property mls 'ScaleFactor ds)
(vlax-put-property mls 'SecondSegmentAngleConstraint 0)
(vlax-put-property mls 'TextAlignmentType 1)
(vlax-put-property mls 'TextAngleType 1)
(vlax-put-property mls 'TextHeight 2.5)
(vlax-put-property mls 'TextLeftAttachmentType 7)
(vlax-put-property mls 'TextRightAttachmentType 7)
(vlax-put-property mls 'TextString "")
(vlax-put-property mls 'TextStyle "standard")
Dag Eddy,
Heb je hier iets aan?
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Left-Justifying-Mleaders-in-Vlisp/m-p/2398733/highlight/true#M271373 (http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Left-Justifying-Mleaders-in-Vlisp/m-p/2398733/highlight/true#M271373)
Grt JMD
Ik heb dit geprobeerd en toegevoegd onder de code maar ik zie geen verschil.
(setq diclist (entget (vlax-vla-object->ename mls)))
(entmod (subst (cons 297 1) (assoc 297 diclist) diclist))
Als ik het vakje aanvink met Left Justify dan komt mijn tekst er gecentreerd uit.
Blijkbaar ben ik toch iets te snel geweest met dat het niet werkt!
Dus voordat jullie zeggen "Aan de schandpaal":
Mijn welgemeende en oprechte spijtbetuigingen.
De oplossing waar JMD naar verwees werkt wel.
Waarschijnlijk niet goed over genomen.
Maar dan nu wel de vraag, wat is het verschil met:
(vlax-put-property mls 'TextAlignmentType 1)