I have a dynamic block that I am trying to add some pretty basic functionality to (at least it seems like it should be simple!). Since I’m still relatively new to DB’s, I figured I’d give some background on what I’m trying to do, cause maybe it could be done with a much easier approach than I have come up with. So if you don’t feel like reading the details, see the fourth paragraph for my actual question.
The block is a sheet reference annotation (that shows: SheetNum/TotalNumOfSheets) that we typical put in the notes section of our construction drawings. It looks nice when the text (which are attributes), lines up with the text in the note (usually Mtext, but sometimes a Mleader). So I constantly find myself completing the tedious task of placing the block at the insert point of the Mtext (which is always justified LEFT TOP), and then calculating the distance down to line that I want the block to line up with.
So what I want the block to be able to do is to be able to have the user grab the block by its basepoint, place it at the insert point of the Mtext object, and just enter the text height of the Mtext note, the line space factor, and the target line of the note that the sheet reference block should line up (the input would all be done via custom block properties in the Properties Palette). And since we almost always use a text height of 0.125 and Line Space factor of 1, those will be the defaults, and really the only thing that would need to be entered would be the line number of the Mtext that the annontation should line up with.
I already figured out most of the constraint parameters necessary and calculated the offset equation using custom parameters. I have all the linework moving correctly using the vertical constraint parameters, however, I cannot figure out how to get the Attributes to move along with the linework. I know how to move text and attributes using Action Parameters, but I can’t do it with Constraint Parameters. So I figured that maybe I could chain an Action Parameter to the Constraint Parameter, but I couldn’t figure out how to do this either. Also, I am using visibity states and would like the visibility grip to move along with everything else as well.
My block is attached. I used some lines for the Constraint Parameters to be associated with, but they are only there for the block to operate correctly, therefore they are invisible in both of the visiblity states. Probably not the best way, but it works.
I open to any suggestions, and any help would be greatly appreciated!
Solved! Go to Solution.
Thanks for the reply and taking the time to come up with a solution. I had thought of doing something along those lines, but I like to hardcode as little as possible into our blocks, because I want them to be as universal as possible. While I did say that the majority of the time we use a text height of 0.125, there are times when our clients actually have preferences/standards that differ from ours, and we always try our best to make the client happy! (what a pain! lol). So this is why I went the Constraint Parameter route instead of using Action Parameters. Because with the Constraint Parameters I can create direct relationships: I can create User Parameters that can either be custom variables (with a defualt value, but changeable by the user) and/or custom equations/expressions based on the custom varaibles or other constraints. Doing this, I can truly keep the dynamic block, well, dynamic! The only thing is that I cannot find a way to use Constraint Parameters on anything but linework. It would be nice if this functionality was extended to text and attributes. Or, if Action Parameters could somehow relate to Constraint Parameters so that objects (like text, attributes, action grips, etc.) could move/behave along with the linework, that would be great too!
Thanks again Thomas. If all else fails, I will probably be deploying the block with your idea. But I still hope what I'm after is achieveable. Like I said I have an okay understanding of DB's, but I am by no means an expert. So if any other guru's have any ideas, please let me know!
Likely not as it is a Program Enhancement and not a deficiency.
Please mark any response as "Accept as Solution" if it answers your question.