MLeader , Block Attributes & Object Properties

MLeader , Block Attributes & Object Properties

Anonymous
Not applicable
1,218 Views
7 Replies
Message 1 of 8

MLeader , Block Attributes & Object Properties

Anonymous
Not applicable

I am probably approaching this the wrong way so I'm hoping someone can help me out or at least point me in the right direction. I've been fiddling with dynamic blocks and mleaders with no success. 

 

The goal is to use a mleader that has a block of attributes (that can later be extracted to a spread sheet) as content and will "grab" certain properties (i.e. length, linetype and handle of a polyline) of the object the mleader is snapped to to be used as the default value of some of those attributes in the block of attributes used as the content of the mleader. I was also hoping to figure a way to be able to select which of the attributes display and how or only display if the attribute has value.

 

I have been somewhat successful all the way up until I reach the point of getting the properties of the object that I'm snapped to with the mleaders.

I've created a dynamic block and was getting happy with the outcome up until I realized that you have to enter each segment of a pline separately.

 

So, it seems like this might be a job for lisp. I haven't messed with lisp since r14, was hardly successful, and quite frankly have forgotten pretty much all of what I learned back then. So, I would greatly appreciate it if someone could save me from the possibility of have to delve into that world again.

 

Rich  

0 Likes
1,219 Views
7 Replies
Replies (7)
Message 2 of 8

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Is it possible to attach a sample drawing with your progress on this issue? I want to make sure I understand what you are trying to capture. You might also take a look in the Autodesk App store at AutoField to see if does what you are trying to do.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 3 of 8

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Did the App I suggested work to fix your issue?

 

If not, please attach a sample file to a post and give me a bit more information.

 

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 4 of 8

Anonymous
Not applicable

Hello @john.vellek

 

Thank you for replying.

 

I haven't had a chance to try the app as I've been up to my eyeballs at work the last few days. I will certainly take a look at it as soon as I can.

 

I don't have a file to attach as I deleted the work once I realized I wasn't going to be able to get the information I wanted, the way I wanted it with the direction I was going.

 

Basically, I want to "get" the length, linetype, and handle of a polyline and combine that information with some block attributes that I can later extract into a spreadsheet.

 

For example, one thing I am trying to do is quantify pipeline/ductbank as it is entered. Or "tag" existing line work already in the drawing. One line represents a group of different size pipes (i.e. 6 @ 5"dia and 4 @ 3"dia.)  The pipe groupings could have multiple uses. (i.e. the 5"dia are for electric and the 3" are for communications). 

 

I started off with a dynamic block utilizing the visibility parameter to change the linetype, and the polar stretch parameter/action to place the polyline. Getting the linetype and length property into an attribute field for extraction seemed easy enough, then i was going to define attribute fields for the different size & types of pipes (i.e. 5"E, 4"E, 3"E.......4"C, 3"C, 2"C etc., etc.). When entering the dynamic block polyline the user (me) would get a dialogue box where the number of the type of pipe could be enter from the available attribute fields. (i.e. 6 @ 5"E and 4 @ 3"C). Then, the extraction to a spreadsheet would include the length of the line and the quantity of each type of pipe that the user entered a number for. From there it would be simple spreadsheet math to get the total length of each diameter and type of pipe. However, not too long after I got the visibility and polar stretch parameters working, I realized that each change in direction of the line would require a separate block making this approach impractical.

 

I then tried using an MLeader style that used a block of attributes (size and type of pipe) as the content. I snapped the mleader to a polyline that was already entered and up popped the dialogue box for the counts. But then I realized that there didn't appear to be anyway to automatically get the length of the polyline that the mleader was snapped to using this approach.

 

I've attached a quick wblock of what I'm currently working on.

 

So here I am. Any help would be greatly appreciated.

 

Thanks again,

Rich

0 Likes
Message 5 of 8

Libbya
Mentor
Mentor

I think I understand what you are trying to do and might have a solution.  I was thinking that it would be possible to replace your multileaders with a dynamic block.  Within that dynamic block place two invisible attributes, one for linetype and one for length.  For the default value of those two attributes, use object fields.  Add attributes for entering the number, size, etc... When you place the leader, you would have to edit the two invisible attributes and select the appropriate line from which you would like to draw the linetype/length information and enter the number/size, etc...  Then use fields to display the appropriate information in the multileader and use data extraction making your spreadsheet pulling the length, linetype, size, number, etc...  

0 Likes
Message 6 of 8

Libbya
Mentor
Mentor

One other thought....  combine the line and attributes all within a block.  Do not attempt to use dynamic actions to modify the lines.  Instead, use 'edit in place' for editing the line, linetype, etc...  That way any object fields referencing the line can already be in place and avoid the task of linking to the appropriate line.

Message 7 of 8

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Ii think @Libbya is correct about using fields to capture the length and linetype. That is the easy part. The part about the handle is trickier. I suggest you explore the Dynamic Block forum or the customization forum to discover a way to capture that and embed it into your block.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 8 of 8

Anonymous
Not applicable

Thanks @Libbya for your suggestions. I've previously tried versions of both of your suggestions but it looks like I needed to take it a step further. I was getting stuck when I need to select a physical object to access the object property selections dialogue to set the value of the fields/attributes. One of the things I tried was to add a pline to the block, use it to access the object property selection dialogue, then erased the polyline in the block editor. I was hoping that, since the polyline was no longer present in the block, the system would prompt me to select a polyline when I inserted the block. But alas, it was a "pipe dream" (get it) and it didn't work as I'd hoped. Based on your suggestions, it seems I was almost there but was hoping for a simple solution without any additional editing steps in the drawing.

 

I have also explored both the dynamic block and customization forms for several hours as @john.vellek suggested before making the post. Most of the solutions referenced xdata which seemed very cumbersome to use (or I was not using it correctly). It now seems apparent that the only way to achieve a truly "acceptable solution" is with a lisp routine, which there doesn't appear to be an existing routine that I've come across, and I was hoping to avoid having to figure it out for myself. Looks like there will be a lot more reading to do.

 

Thanks you again for your suggestions. Please leave the thread open for now, in the event someone else has a complete solution I am seeking or I come across one myself.

0 Likes