Hello, I'm a new member of the discussion groups, & have benefited from this thread. I have recently started writing some macros in DIESEL, & have so far been reasonably succesful, however I have encountered a problem that has me baffled.
I have written a macro, which is very similar to that written by Wilco4 - It measures an area, inserts a block, & assigns the value of the measured area to a specific attribute within the block.
The intended purpose of the macro, is to assist me assign specific attributes to many rooms illustrated on a floor plan.
^C^C_MEASUREGEOM;AR:O;\^C^C_-insert;ROOM_LABEL;1;1;0 $M=$(getvar,ROOM_AREA);Room_AREA;1
This works well, however if I then run the macro a second time, then the initial block inserted adopts, & displays the new attribute value when autosave runs, or after the DWG is closed & reopened.
Taking this to it's natural conclusion, if I were to run the macro 1oo times; I would end up with 100 blocks, which all display the last, (100th), measured value.
As well as the macro itself, I have also assigned the attribute default with a diesel expression to manage the data as "area".
What I would like to know: is there any way of "freezing" each attribute value immediately after assigning the same value, so that each block may hold independent attribute values?
Any help would be warmly received
B
Hi, I am using this macro and it works great. I am wondering if there is anyway to build a field into this macro. This is desired because the field will automatically update as the area of the object changes.
%<\AcObjProp Object(%<\_ObjId 8795918873664>%).Area \f "%lu2">%
This is the expression for finding area with a field. The part highlighted red is the specific object chosen when in the field menu. Ideally, you can just enter LAST OBJECT instead of choosing the PLine itself.
Is there a way to write PLine in a macro so you can choose an unlimited number of points?
Thanks
Can't find what you're looking for? Ask the community or share your knowledge.