Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mtext Feld Displaying Part of Contents

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
Anonymous
1533 Views, 9 Replies

Mtext Feld Displaying Part of Contents

Anonymous
Not applicable

Hello Everyone!

 

I am trying to create Mtext Field that uses object's content, but only part of it. And I want to be able to choose which part of it I need. 
For example:
The original Text is 02/14/18

And I want to create 3 separate Mtext fields that display
1. 02
2. 14
3. 18

Is this possible and how? I am really bad at using expressions, maybe this is the problem...

Thank you in advance!

0 Likes

Mtext Feld Displaying Part of Contents

Hello Everyone!

 

I am trying to create Mtext Field that uses object's content, but only part of it. And I want to be able to choose which part of it I need. 
For example:
The original Text is 02/14/18

And I want to create 3 separate Mtext fields that display
1. 02
2. 14
3. 18

Is this possible and how? I am really bad at using expressions, maybe this is the problem...

Thank you in advance!

9 REPLIES 9
Message 2 of 10
john.vellek
in reply to: Anonymous

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

It would be helpful if you showed me your drawing to clarify what you are looking to do.  It sounds to me like you are linking Fields in Mtext to text or attributes.

 

So as an example (attached) I made three blocks that each contain an attribute.  Then in Mtext I created Fields that are separated by a slash (plain piece of text) that are linked to each of the attributes. Is this what you are trying to do?

 

Capture.PNG

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes

Hi @Anonymous,

 

It would be helpful if you showed me your drawing to clarify what you are looking to do.  It sounds to me like you are linking Fields in Mtext to text or attributes.

 

So as an example (attached) I made three blocks that each contain an attribute.  Then in Mtext I created Fields that are separated by a slash (plain piece of text) that are linked to each of the attributes. Is this what you are trying to do?

 

Capture.PNG

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 3 of 10
WarrenGeissler
in reply to: Anonymous

WarrenGeissler
Advisor
Advisor

Hi @Anonymous, 

I believe you are looking for the SUBSTR LISP  function explained >>HERE<<. If this is what you are looking for, I don't believe there is any way you can add LISP code into a field formula.


Warren Geissler
Drafting Manager Denver Water
_____________________________________________

Please ACCEPT AS SOLUTON if this works
(...and doesn't melt your computer or cause Armageddon)

0 Likes

Hi @Anonymous, 

I believe you are looking for the SUBSTR LISP  function explained >>HERE<<. If this is what you are looking for, I don't believe there is any way you can add LISP code into a field formula.


Warren Geissler
Drafting Manager Denver Water
_____________________________________________

Please ACCEPT AS SOLUTON if this works
(...and doesn't melt your computer or cause Armageddon)

Message 4 of 10
Anonymous
in reply to: john.vellek

Anonymous
Not applicable

@john.vellek Thank you for the reply and sorry for the bad explanation. I want to create an arc aligned field, but since this is impossible (or at least I have no idea how to do this) I am trying to make a "Fake" one. 
Arc Aligned Field.JPG
I have a seal and a Mtext object with a date. I want the date of the seal to update automatically when I update the Mtext date. 
In order to do that, I created 3 separate fields containing "Content" of the Mtext object but I need them to show different parts of it. This must be done with expressions, but I have no idea how to create a new expression for Object and what to type in..

@WarrenGeissler Thank you for the answer, I think I need expression change, not a lisp...

0 Likes

@john.vellek Thank you for the reply and sorry for the bad explanation. I want to create an arc aligned field, but since this is impossible (or at least I have no idea how to do this) I am trying to make a "Fake" one. 
Arc Aligned Field.JPG
I have a seal and a Mtext object with a date. I want the date of the seal to update automatically when I update the Mtext date. 
In order to do that, I created 3 separate fields containing "Content" of the Mtext object but I need them to show different parts of it. This must be done with expressions, but I have no idea how to create a new expression for Object and what to type in..

@WarrenGeissler Thank you for the answer, I think I need expression change, not a lisp...

Message 5 of 10
StephenThomasGrace
in reply to: Anonymous

StephenThomasGrace
Advocate
Advocate

To accomplish this, use one of the Date & Time field categories such as "SaveDate" and make your own custom format.

three separate mtext with d only in one. Then MM in one and yy for the last.

Or better yet create a block of your stamp using attributes with these field codes.

 

I use the PlotDate field category which updates the date whenever the drawing is plotted.

%tc1 d MMM yyyy

that custom format gives you 18 FEB 2018

 

-steve

To accomplish this, use one of the Date & Time field categories such as "SaveDate" and make your own custom format.

three separate mtext with d only in one. Then MM in one and yy for the last.

Or better yet create a block of your stamp using attributes with these field codes.

 

I use the PlotDate field category which updates the date whenever the drawing is plotted.

%tc1 d MMM yyyy

that custom format gives you 18 FEB 2018

 

-steve

Tags (1)
Message 6 of 10
john.vellek
in reply to: Anonymous

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

How about this?  I changed your Mtext to a block with three attributes (Month-Day-Year) and then linked the three fields to each corresponding attribute.

Capture.PNG

 

If you want to use something like the Save Date or even a custom property for Signed Day, Signed month, signed year, you couldlink the individual fields to those properties as well.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback

Hi @Anonymous,

 

How about this?  I changed your Mtext to a block with three attributes (Month-Day-Year) and then linked the three fields to each corresponding attribute.

Capture.PNG

 

If you want to use something like the Save Date or even a custom property for Signed Day, Signed month, signed year, you couldlink the individual fields to those properties as well.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 7 of 10
Anonymous
in reply to: john.vellek

Anonymous
Not applicable

@john.vellek I thought of that solution, and it works good, but my intent is to use "find and replace" command because usually, we have several dates on several layouts. That way I can execute only one command and change all the dates without the need of scrolling between the layouts and changing eighter ArcAligned text or Block attributes. 

 

@StephenThomasGrace In the past we used date field, however, many times we need to type in a specific date for example date of the previous working day, etc,

0 Likes

@john.vellek I thought of that solution, and it works good, but my intent is to use "find and replace" command because usually, we have several dates on several layouts. That way I can execute only one command and change all the dates without the need of scrolling between the layouts and changing eighter ArcAligned text or Block attributes. 

 

@StephenThomasGrace In the past we used date field, however, many times we need to type in a specific date for example date of the previous working day, etc,

Message 8 of 10
StephenThomasGrace
in reply to: Anonymous

StephenThomasGrace
Advocate
Advocate

I know exactly what you mean. There are many "Date" fields that you can apply formatting to, but there isn't a "Static Date" that has formatting capability.

 

I have resorted to individual Sheet Set "CurrentSheetSetCustom" fields for Month/Date and Year to do the automatic updating across all layouts just as you are trying to do. Example below is a block with attibutes linked to the SSM. All revision dates in the dozens of layouts and drawings are updated at once.

SSM.PNGRev.PNG

0 Likes

I know exactly what you mean. There are many "Date" fields that you can apply formatting to, but there isn't a "Static Date" that has formatting capability.

 

I have resorted to individual Sheet Set "CurrentSheetSetCustom" fields for Month/Date and Year to do the automatic updating across all layouts just as you are trying to do. Example below is a block with attibutes linked to the SSM. All revision dates in the dozens of layouts and drawings are updated at once.

SSM.PNGRev.PNG

Message 9 of 10
john.vellek
in reply to: Anonymous

john.vellek
Alumni
Alumni
Accepted solution

Hi @Anonymous,

 

I don't like to rely on Find/Replace for such things which is why I had suggested you use custom Drawing Properties.  I have attached another version of your file that shows this in action.  If you change the properties, they get updated everywhere in the file.

 

Capture.PNG

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback

Hi @Anonymous,

 

I don't like to rely on Find/Replace for such things which is why I had suggested you use custom Drawing Properties.  I have attached another version of your file that shows this in action.  If you change the properties, they get updated everywhere in the file.

 

Capture.PNG

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 10 of 10
Anonymous
in reply to: john.vellek

Anonymous
Not applicable

That is what I was looking for! Thank you very much!

That is what I was looking for! Thank you very much!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report