Jump to content

put FIELD in CELL


benzson11

Recommended Posts

is there anyone that can help me create a lisp routine to get:
-get the attribute block value (different column)
-get position x of a block (different column)
-get position y of a block (different column)

-then put it on CELL as FIELD.
I know that this is possible manually but is there anyone who can create a lisp routine for this. It would be a great help.

 

Thank you in advance,

Link to comment
Share on other sites

Sorry for the inconvenience that I cause. please see attached dwg file for the example and also attach the lisp routine that i found c/o lee mac. which select a dimension and automatically field the dimension value to the cell. basically that is what i need. i need a lisp routine to select the block and get the position (x)/(y) or northing and easting of the block and field it directly to the cell. thank you again.

sample.dwg

DIM2CELL.lsp

Link to comment
Share on other sites

A block can return x,y,z etc as a field it is a case of working out the field coding then look at lee's code 


(setq tStr (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectId Obj)) ">%).Measurement \\f \"%lu6\">%"))

a block

%<\AcObjProp Object(%<\_ObjId 1038227968>%).InsertionPoint \f "%lu6">%

 

 

Screen Shot 10-12-18 at 01.12 PM.PNG

Link to comment
Share on other sites

@BIGAL thank you for your reply. I had tried replacing the field codes in the lisp routine. but I'm not that familiar with some of the codes like on how the lsp will select the object. I can modify simple routine but this is a lot complicated for me. 

Link to comment
Share on other sites

You will need to repeat the data to cell 4 times using a different value of the field each time. 1st is name, then x, y, z. 

 

Did you google block attributes to table there is probably code already out there v's a fair bit of redoing lees code.

Link to comment
Share on other sites

@BIGAL again thank you so much. before it took me atleast 1-2mins per block to get the attribute name, x and y. now it only took me around 2-3 secs per block. hahaha
 

Link to comment
Share on other sites

I am looking at going commercial soon semi retiring and the biggest issue you have with managers is how much you save them for a little upfront cost. 

 

if you look at 2 minutes @ $100 / Hour = $3.33 per task, If I charged say $50 for the code that would be 15 setouts but it costs now $0.03 per setout. Like lots of others here we are talking 20 minutes is now 10 seconds but still struggle to get paid for it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...