Jump to content

Shared attributes


BigThumper

Recommended Posts

I'm not sure how to implement this - let me see if I can at least express it intelligibly here.

 

I design specialty systems for buildings. I have several dynamic blocks representing different devices to be installed in rooms. Each of these already has it's own Block Properties Table and Visibility settings which work well.  I'm able to use data extraction to pull the attributes of the blocks for various purposes.

 

Start with a clear floor plan.  Now I'll add the blocks to various rooms/locations as appropriate.  And then...I need to label the rooms (forget about whether or not the architect had labels shown previously - pretend I drew the plan from scratch).  Whether it's a simple text label or a specially formatted block with attributes - the rooms get labels.

 

But...as long as I'm labeling the rooms - I'd like those labels to be associated with the device(s) in each room.  I'm not seeing an obvious method where I can select one or more blocks and set their (hidden) location attribute to another block just by a couple clicks.  Writing this has somewhat clarified the issue and possibly my answer is a lisp routine - but I'm still asking for ideas.

Link to comment
Share on other sites

If the room has a outer pline then you could do a couple of things find the room label <layer block ?> then find all the blocks inside the room maybe compare to a list of blocks and update attribute.

 

Easiest way is pick text/block, pick outline. Is it block or text is a simple test.

 

How much lisp do you know, can provide snippets of code that do different bits of the task.

 

1 text or block select

2 co-ords pline

3 ssget wp insert

4 repeat for all blocks in list update attribute

 


text or block select is in vba need to redo


; co-ords of pline
(setq ent (entsel "pick pline"))
(if ent (setq co-ords (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car ent))))))

 


(setq ss  (ssget "WP" co-ords (list (cons 0 "Insert"))))

 

Link to comment
Share on other sites

4 hours ago, BIGAL said:

If the room has a outer pline then you could do a couple of things find the room label <layer block ?> then find all the blocks inside the room maybe compare to a list of blocks and update attribute.

 

Easiest way is pick text/block, pick outline. Is it block or text is a simple test.

 

How much lisp do you know, can provide snippets of code that do different bits of the task.

 

1 text or block select

2 co-ords pline

3 ssget wp insert

4 repeat for all blocks in list update attribute

First of all - thanks for the reply.

 

This isn't quite what I'm looking for - I want to build an association between blocks that has nothing to do with other geometry.  Surrounding plines might exist to define suite areas - but I don't find that consistently implemented by architects and I'm generally working with their floor plans.  The least I have to re-draw the better - as it is I usually have quite a bit of cleanup to do to get a "clean" plan.

 

I'd love something totally drag-n-drop or "clickable" - but what I *think* I need is to create a label block with the appropriate attribute(s).  Then, assuming it's possible, have a lisp routine that:

 

1.  Prompts to select a valid label block if none selected - otherwise use the current selection.

2.  Prompts to select target blocks - from 1 to any.

3.  On execution, set the target block "location" attribute (which would be visible in properties but not model space) to a field object which references the label.

 

The reverse operation would also be desired - select the blocks needing a label, then select the label.

 

If this is doable - then once the relationships are created the only place I would need to change the "location" would be the label block - the other blocks would self-update via the field references.  So I'd be left with a single visible label per room - while my data extraction would be able to have the location associated with each individual device.

 

I'm not locked into this method by any means but it makes sense to me.  Other suggestions?

 

Or to implement this - again, suggestions?  I may look at some of Lee Mac's offerings - maybe his "Area Field to Attribute".

Link to comment
Share on other sites

It's possible I don't understand your problem or that my solution is unworkable for various reasons, but here goes.

 

In the early days, Land Desktop created profiles by using invisible blocks. Could you add a block to each room, or add attributes to your blocks, with invisible attributes? These attributes could include the information you need or point somehow to the blocks in the same area. The system variable ATTDISP will let you inspect your attributes by making them visible.

Link to comment
Share on other sites

Maybe in mtext you can have fields so you could make a multi line text each line being the entity name of the relevant block, put it on a no plot layer.

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...