How to copy paste formula with fields?

How to copy paste formula with fields?

yutianchen86
Contributor Contributor
4,127 Views
17 Replies
Message 1 of 18

How to copy paste formula with fields?

yutianchen86
Contributor
Contributor

I want to copy a formula and paste into mtext with field intact.  However, these fields turned into numbers when I paste.  Is there a system variable or a method that can be done to make paste as field possible? 

 

Thanks.

 

Copy this

field 1.JPG

 

paste into this

field 2.JPG

0 Likes
Accepted solutions (1)
4,128 Views
17 Replies
Replies (17)
Message 2 of 18

Patchy
Mentor
Mentor
0 Likes
Message 3 of 18

yutianchen86
Contributor
Contributor

Not formula in table, I am referring to formula in fields.

0 Likes
Message 4 of 18

ВeekeeCZ
Consultant
Consultant

Copy-paste this part:

 

image.png

 

But we usually use the other way around. Create/edit an MTEXT, Mouse RightClick, pick Insert Field...

0 Likes
Message 5 of 18

yutianchen86
Contributor
Contributor

I copyed it but pasted into this.field 3.JPG

0 Likes
Message 6 of 18

ChicagoLooper
Mentor
Mentor

What does 533.41 represent? And what does 74.62 represent? What do those numbers measure?

 

 

 

Chicagolooper

EESignature

0 Likes
Message 7 of 18

yutianchen86
Contributor
Contributor

They are areas of closed polylines.  I don't think this matters because these fields can be any properties of any objects.

0 Likes
Message 8 of 18

pendean
Community Legend
Community Legend

This is the actual field code, aka formula:

 

Capture.PNG

0 Likes
Message 9 of 18

ChicagoLooper
Mentor
Mentor

Yes, it does make a difference. Why? Because you are giving AutoCAD a specific set of instructions when you want to generate the field AREA.

 

10-Field.PNG

 

You want a specific piece of mtext to insert a specific field, or a value. In order to do this, it must evaluate a specific object and insert the result (the property AREA) as the mtext contents. You, on the other hand, are merely pasting the RESULTS of the operation, not the operation itself. You need to re-run, or recreate, the operation. The operation, or the steps, constitutes the FIELD area.

 

Make another field. Start a new mtext, at your flashing cursor, go to Objects=>Formula=> and PASTE each formula like shown below, then click Evaluate, then OK to exit.

 

20-paste to formula.PNG

 

 

 

 

Chicagolooper

EESignature

0 Likes
Message 10 of 18

yutianchen86
Contributor
Contributor

Please see the original post again.  the 1st screen shot is what I have.  I need to copy this (circled in red).  The 2nd screen shot is what I want to paste it into.  However, when I pasted it only numbers show up, not the fields. I want the fields link to remain in the mtext.  

 

 

 

0 Likes
Message 11 of 18

vinodkl
Mentor
Mentor

I have created two closed polyline and inserted the area of closed polyline as field in mtext. Is this what you were after? 

 

830f75a3-9125-49ab-bc88-541a81007e8d,640,710

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 12 of 18

cadffm
Consultant
Consultant

@yutianchen86 

First question: why?
Why do not you create the title block in MText? (inside TEXT MTEXT TEXT ATTRIBUTE .. -> RightClick -> add field)

 

If you have existing formular fields and would therefore like to copy:

Open the object to edit (example: Double click a TEXT or whereever your formular field is),

copy the field from there.

 

 

Sebastian

0 Likes
Message 13 of 18

vinodkl
Mentor
Mentor

screencast was missing in my earlier post.

 

 

 

 

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
Message 14 of 18

yutianchen86
Contributor
Contributor

Sorry for the confusion, I need to further explain my case.

 

This single fields within a field is generated is by Lee Mac's Length & Area Field LISP.  It automatically sums all geometry area into one single field.

 

http://www.lee-mac.com/lengthfield.html

 

I want to extract the calculation of these areas in a printed drawing.

I have many operation like this I want to be able to copy and paste directly into "field"+"field"+"field"....

However, when I copy and paste, the fields turned into numbers with no link. It would be ideal to paste into fields so in the future they will update upon regen when I modify the geometries. 

 

Samething when copying mtext with fields.

 

Again Autocad might night have such function or system variable.  I am just wondering.

 

Thanks.

field 4.JPG

 

 

0 Likes
Message 15 of 18

yutianchen86
Contributor
Contributor
Accepted solution

For those of you is also looking for solution to this,  I was able to find a work around using Lee Mac's Copy Field Lisp.

http://www.lee-mac.com/copyfield.html

 

Execute the lisp, pick the origin field, then click the target text twice.  exit out of the command.  Double click into the new field, then delete front cExpr text.

SCREEN RECORD.gif

0 Likes
Message 16 of 18

ya312
Contributor
Contributor

How to get formulas without copying?

0 Likes
Message 17 of 18

cadffm
Consultant
Consultant

?

 

Start FIELD command and create a formula field.

Not the answer you are after? Then explain it better  please.

 

For your search engine: autocad field formula

Sebastian

0 Likes
Message 18 of 18

yutianchen86
Contributor
Contributor

refer to my comment above, see link to lee mac's website with lisp script.

0 Likes