Skip to content
Discussion options

You must be logged in to vote

instead of a MLeader, a normal leader seems to work

import traceback
from pyrx import Rx, Ge, Gi, Db, Ap, Ed


def makeTempMtext(db: Db.Database):
    fld = Db.Field("%<\\AcVar Filename>%")
    mt = Db.MText()
    mtId = db.addToCurrentspace(mt)
    mt.setField(fld)
    mt.setLocation(Ge.Point3d(100, 100, 0))
    fld.evaluate()
    return mtId


def makeLeaderField(db: Db.Database):
    mtid = makeTempMtext(db)
    leader = Db.Leader()
    lid = db.addToModelspace(leader)
    leader.appendVertex(Ge.Point3d(50, 0, 0))
    leader.appendVertex(Ge.Point3d(100, 100, 0))
    leader.attachAnnotation(mtid)
    return lid


def makeLine(db: Db.Database):
    line = Db.Line(Ge.Point3d(0, 0, 0), Ge.P…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@schoeller
Comment options

@schoeller
Comment options

@CEXT-Dan
Comment options

@CEXT-Dan
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by schoeller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants