333onlyhalfevil wrote: ↑Thu Mar 13, 2025 7:38 pm
How does that compare to yours? What's your third step for?
It is not about the third step, the first step is indicating a Block Reference entity.
CVH wrote: ↑Fri Mar 07, 2025 9:15 am
Would it not be more appropriate to combine all that as a tool that includes a Text entity and a Leader:
- 1) Indicate a Block Reference
- Presented preview is the Text floating in association with a default Leader.
- 2) Indicate Text position
- Presented preview is the Text no longer floating with the arrow tip floating
- 3) Indicate Leader arrow tip position
- Over new until the tool is terminated.
(A WIpeOut under the text would be nice but this entity type is undocumented )
As interactive we can step one level back from state 2 or 3.
Talking about 'OP', reread the post(s) and let us evaluate the original sequence:
- Select a Block Reference entity
- In the Properties Editor, navigate to Specific Properties .. Referenced Block
- Select the entire contents of this text field
- Right-click and choose Copy to the OS Clipboard
- Launch the Text Tool (
TE), adjust Font, Font Height, Simple Text and Alignments if necessary
- Overwrite existing text with copied text (
Ctrl+V)
A custom tool was requested for the above sequence. (See: 1_expl.jpg)
The text is then inserted in the drawing by the user.
- Hit the
OK button of the Text Editor dialog
- With a preview indicate the insertion point for the Text entity.
- Click left to confirm or right to cancel
In a second stage a Leader entity is added based on this Text Entity with 'Leader from selected text' (
T2L)
Remind that the Leader will point to the left when the text is aligned different than horizontally 'Right'.
And that the arrow tip has a fixed offset in XY = text height. Both are limitations of the tool.
- Select the text in question.
-
T2L (see contributions by dmitpon:
2T or
T2L)
- Select the newly created Leader entity
- Drag its arrow point to the desired location and release
I only combined all these steps in an interactive Addon script with a 3 step process as described above.
Not using the OS Clipboard because the referenced Block name is a property of the indicated and queried Block Reference entity.
Not using the Text Editor dialog but querying its last used settings for simple text.
Not limited to left or right as by
T2L, the indicated arrow tip position is used to determine left or right.
Above or under is not yet addressed.
It can't be made public with the extra Wipeout entity because we have to wait for the next QCAD release:
FS#2651
A hard-coded Block name position offset reference list or 'database' is of no use.
Unless you must have a clear proposal for a Block definition called:
- '
HEA_100_odsejcak_220mm'
- '
PL_G2_1_pogl'
- '
PL_IPE330_umetak_307x75x10_pogl'
- ... and several hundreds more
Then for a related Block Reference entity at any angle or scale what can induce mirroring.
How can I predict which blocks a user has in their drawings?
Or is it the intention that the user adds such offset values in as database and that directly in the script?
The follow up is discouraging.
In a way the 'OP' wants to overcome the lack of XREF capabilities.
Making inserted Library items related to the changes made to these Library items file content.
This could be done by inserting them again one by one at an arbitrary position with 'Overwrite blocks' active.
Deleting those at the arbitrary position afterwards.
But there is no property that tells us if a Block is generated from a Library item.
At least I now have a tool that indicates the referenced Block name and insertion point when indicating near a Block Reference entity.
Typically some third party Block handling is different, the Block content may be nowhere near the Block origin.
The insertion point may thus be miles away from the displayed Block content for a Block Reference entity.
e.g. recent topics:
11506 or
11508
Regards,
CVH