Author Topic: suggestions pline area?  (Read 5841 times)

0 Members and 1 Guest are viewing this topic.

raresp

  • Guest
suggestions pline area?
« on: October 10, 2003, 03:23:28 PM »
Guys,
Here is what I'm trying to do and I need some sugestions from you

We are working for a lot of subdivisions and I need to develop a program that will write the area of a polyline (closed) into an attribute of a block. of course if I modifiy the pline the area should be updated automatically. I have a function from acadX.com that will do that (kind of). This function is using a text instead of block and is linking as an extended data the handle of text entity to the polyline..but if the user is moving this text to paper space or copying the text somewhere else the link is lost. This is right because autocad will create a new entity with a new handle. Now I'm thinking that I should reverse: attach the pline handle into an invisible att of my block and when the user is changing the pline the blocks to be updated. In this way does not matter whether
the user is moving (or copying) the block in pspace or mspace. Am I right or ????
Who is working in subdivisions will know that I'm talking about sanitary or storm areas. :)
I don't need to update this areas in real time with a reactor, I can have a routine for initial creeation (which will insert the blocks and initial area) and one for updates.
Any suggestions??

And another question (off topic) I'm trying to animate my subdivision with autodesk viz. Do you know which would be the best method to import my surface into viz. 3dgrid, 3dfaces or contours and the use terrain tool in viz??


Thanks a lot

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
suggestions pline area?
« Reply #1 on: October 10, 2003, 03:46:59 PM »
Quote
I don't need to update this areas in real time with a reactor

that's good! Thought that's exactly what you were going to say. :D

Quote
I can have a routine for initial creeation (which will insert the blocks and initial area) and one for updates.


Do you have a specific block that you use?
TheSwamp.org  (serving the CAD community since 2003)

raresp

  • Guest
suggestions pline area?
« Reply #2 on: October 10, 2003, 03:53:52 PM »
yes we do have a block that is stored on the server and is used by all cad users. So I can add an invisible att to it.
I'm gonna try a first version (hopefully this weekend  :D )

SMadsen

  • Guest
suggestions pline area?
« Reply #3 on: October 14, 2003, 08:20:02 AM »
raresp,
Just remembered I have an early version of a routine that does what you describe - well, more or less. It uses a block with at least two specifically named attributes - one to hold the area text and one to hold a handle to an entity (yes, only one in this version). More info in the header of the lsp file.

It's posted on my petty site in "AutoLISP Archive" and is called Roomarea.lsp. There's also a block there you can use to test it with.

raresp

  • Guest
suggestions pline area?
« Reply #4 on: October 14, 2003, 09:08:16 AM »
Thanks a lot. I checked your lisp and it is kind of what I want..., but I already coded my first main function and I 'm planning to finish this as an learning exercise. I'll have an eye at your source, of course with your approval :-)
As a first difference that I noticed is that I'm asking the user to select the polylines first then the program will find the centroid and will insert the blocks containing area and handle
Otherwise is pretty much the same.
I know I'll have problems with updating the area....because some of the users will move or copy that block in pspace (this will be the second main function... but I'm not to this step yet.)
Thanks again