Combining Fixo's and my ideas. You get the ObjectID's of the PolyLine and the Circle. Then strcat them into the fieldcode of a formula field.
To get the field-codes:
- Create temporary field, select Objects in the Field Category and Formula in Field Names.
- Right click in the Formula box, pick Insert Field
- Select Objects in the Field Category and Object in Field Names.
- Pick the PL and select its Length property, press OK
- Type + in the Formula box.
- Right click in the Formula box, pick Insert Field
- Select Objects in the Field Category and Object in Field Names.
- Pick the Circle and select its Diameter property, press OK
Now the formula field-code (at the bottom) should look something like this:
%<\AcExpr (%<\_FldPtr 816006576>%+%<\_FldPtr 816002800>%) \f "%lu2%pr2">%
Double click on the 1st field inside (the PL's length). It's field code should look something like this:
%<\AcObjProp Object(%<\_ObjId 8796087803968>%).Length \f "%lu2%pr8">%
Then double click on the 2nd nested field (the Circle's diameter), which gives a field code like this:
%<\AcObjProp Object(%<\_ObjId 8796087804096>%).Diameter \f "%lu2%pr8">%
Copy-paste all 3 those into a blank Notepad file. Replace the %<\_FldPtr ######>% portions with their relevant field-codes to get something like this:
%<\AcExpr (%<\AcObjProp Object(%<\_ObjId 8796087803968>%).Length \f "%lu2%pr8">%+%<\AcObjProp Object(%<\_ObjId 8796087804096>%).Diameter \f "%lu2%pr8">%) \f "%lu2%pr2">%
Select and copy that line, then go to acad's command line and type this:
(progn (prin1 (getstring t)) (princ))
Paste the modified field-code and press Enter. Now select the escaped field-code so you can copy and paste it into your lisp. It should be something like this:
"%<\\AcExpr (%<\\AcObjProp Object(%<\\_ObjId 8796087803968>%).Length \\f \"%lu2%pr8\">%+%<\\AcObjProp Object(%<\\_ObjId 8796087804096>%).Diameter \\f \"%lu2%pr8\">%) \\f \"%lu2%pr2\">%"
Note as fixo's using the strcat to replace those numbers in the string with the selected ObjectID's do the same for both in the above string.