Announcements

Announcement: We’re aware of an issue affecting starting a new topic from category pages and creating new blog posts. New topics can still be started directly from the relevant board. Learn more here.

Use return value of command to fill a title block

Use return value of command to fill a title block

Schierz
Participant Participant
1,041 Views
3 Replies
Message 1 of 4

Use return value of command to fill a title block

Schierz
Participant
Participant

Hi,

I would like to enter a title block into a drawing. The value of the title block should be determined by my own ARX function (or variable).

How would I do that?

 

My ARX function returns a string:

 

phgetscaletext.pngphgetscaletext.png

Cheers,

Rudiger

0 Likes
Accepted solutions (1)
1,042 Views
3 Replies
Replies (3)
Message 2 of 4

rkmcswain
Mentor
Mentor

What do you mean by "the value of the title block"?

Do you mean you want to push the string returned by your function into a TEXT or MTEXT object?

0 Likes
Message 3 of 4

Schierz
Participant
Participant

Yes, I want to push it to an MTEXT object. The idea was, to use a title block to do so, like a system variable, but my own varible or the result of my function, i.e. like the modemacro system variable:

 

titleblock.pngtitleblock.png

0 Likes
Message 4 of 4

Schierz
Participant
Participant
Accepted solution

I found a solution by myself.

 

Solution: Use a lisp variable to push the output of an ObjectARX function to a title block.

 

1. The function `phgetscaltext' returns a string. Push the result of `phgetscaltext'  to a lisp variable, i.e. phscale:

phscale1.pngphscale1.png 

2. By creating an mtext, insert the lisp variable phscale as title block into the mtext:

phscale2.pngphscale2.png3. After changing the internal value:

phscale3.pngphscale3.pngr

4. I call my function to change the lisp variable phscale and the _regen to update the title block:

phscale4.pngphscale4.png

0 Likes