Use return value of command to fill a title block

Use return value of command to fill a title block

Schierz
Participant Participant
1,040 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.png

Cheers,

Rudiger

0 Likes
Accepted solutions (1)
1,041 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.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.png 

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

phscale2.png3. After changing the internal value:

phscale3.pngr

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

phscale4.png

0 Likes