Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Very new to Dynamic Blocks

18 REPLIES 18
SOLVED
Reply
Message 1 of 19
robyn.henke
1534 Views, 18 Replies

Very new to Dynamic Blocks

I have just recently started converting some of our blocks to dynamic blocks (I mainly work in the HVAC world) and think I have gotten quite good at using the Visibility Parameter and that is about the only parameter I have used, besides rotation and flip.

 

The problem comes when I want to have multiple visibility parameters in a block, which I have read is possible using the Lookup Parameter and the Lookup Action.  I also understand that this can get quite complicated.  The only Actions I am familiar with are Rotate and Flip.

 

So, what I want to accomplish is this:  I have a VAV Box dymanic block that consists of the 6 sizes of vav boxes our office uses most.  This blocks works great when using the 1/8" scale, but when using other scales, it comes in the wrong size because the whole block is scaled up or down.

 

What I had done with other blocks was created visiblity parameters for each scale (no other visibility parameters needed).  I wanted to do that with the VAV Box block too.

 

So, I want each size of VAV box (6) to have scale options (6 scales).

 

Am I making this complicated or is there a simpler solution?

 

I am not opposed to a lot of work where these blocks are concerned.  My goal is to make this as simple for my users as possible, even at the expense of me losing my mind!

 

Any help/direction would be greatly appreciated!

 

I have attached the VAV Box block as it is being used right now.  We just have to rescale is when using it at any scale other then 1/8".

 

The reason for the rescaling is that these routines were created before I started working with customization and I just went with what was there and learned customization by just jumping in and figuring things out.  So, the routines that created these blocks are at least 20 years old and I did not want to update any of the lisps/macros used.

 

If I can leave things as they are and just incorporate them into the new technology, that is what I prefer.

 

Again, thanks for any help/direction!

18 REPLIES 18
Message 2 of 19
Libbya
in reply to: robyn.henke

In looking at your block, it is set to Annotative = No.  Because of this and your description of the issue, I assume that when you change the drawing scale you DO want the block to scale so that regardless of the drawing/viewport scale, the block will appear to be the same size when plotted.  If that is the case, then select the block, right-click and select Block Editor.  Once block editor opens, go to the properties palette (without anything selected) and go to the Annotative property.  Change it to YES.  After that, the block will automatically scale when the drawing scale or viewport scale is changed.  In order to make it the correct size for all scales, you may need to scale all of the objects within the block. 

Message 3 of 19
robyn.henke
in reply to: Libbya

This is the macro that inserts our vav box block.

 

^C^C-INSERT;vav-all;\!hvds;;\(IF(NOT C:LEXPLODE)(LOAD "LEXPLODE")) LEXPLODE;L;;

 

We do not usually use the vav box block with multiple scale drawings, so being annotative really is not an issue.

 

Does this make sense?

 

I have attached a block I recently updated to have the scale visibility parameters I mentioned.

 

As you will see, because of the macro routine used to insert this block, I scaled the block accrodingly so when the correct scale is chosen, it is scaled by the macro properly.

Message 4 of 19
Libbya
in reply to: robyn.henke

I don't understand what you are looking for.  Do you want the block to scale automatically based on the drawing scale or viewport scale?  

 

If so, then make it annotative.  

If not, then I don't understand why you want the different scales.  

Message 5 of 19
robyn.henke
in reply to: Libbya

Depending on the scale set, the blocks come in as shown in the attached file.

 

The 1/8" scale blocks are the correct size (they are not the dynamic blocks).

 

Again, if I am making this more complicated than need be, tell me.

 

I am just doing what I think is right based on my past years of experience with customization that I learned on my own.

Message 6 of 19
Libbya
in reply to: robyn.henke

Please explain your reason for the various scales. 

 

The typical way that autocad is used is to draw objects at 'actual size' and then use a plot scale if plotting from model space or use a viewport scale if plotting from paperspace.  It seems that you are not doing either one and so, trying to help is difficult without further explanation of what you are actually trying to accomplish and why.

Message 7 of 19
robyn.henke
in reply to: Libbya

I have worked with AutoCAD for 16 years and customizing for 14 years.

 

I know to draw objects actual size and work with and maintain over 150 blocks.  I am the Senior CADD/Revit Technician after all.

 

We have ALWAYS had a problem with a handful of blocks not coming in correctly at scales other then 1/8".  They are either too small or too big.

 

The last file attachment shows this with the vav boxes.

 

The way I figured around this was to create the "scaled" visibility parameter.

Message 8 of 19
Libbya
in reply to: robyn.henke

If you actually want to solve your issue, then please focus on answering the specific questions I have asked rather than asserting your credentials/experience.  Your issue and the solution you have used of adding visibility states does not make sense to me.  I do not have any issues with blocks inserting at the wrong size.  Adding visibility states that will then need to manually be adjusted in order to address the issue seems a whole lot more difficult to me than just having the blocks insert at the correct scale.  

 

If it is a block that is drawn to actual size then WHY DO YOU WANT IT TO SCALE DIFFERENTLY FOR DIFFERENT DRAWING SCALES?  

 

If you want it to scale to different drawing scales, then WHY NOT MAKE IT ANNOTATIVE SO THAT IT SCALES AUTOMATICALLY RATHER THAN GOING THROUGH THE ADDED HASSLE OF ADDING THE VISIBILITY STATES WHICH WILL ALSO NOT FUNCTION AS WELL BECAUSE THEY WILL RELY ON THE USER MANUALLY ADJUSTING THEM TO THE DRAWING SCALE?

 

Does your insertion macro scale the block in an unwanted manner?  If so, then why use it?

 

Your vav-all block for the visibility state of "5" - 8" Inlet Size" is drawn so that it shows a rectangle 0.125" x 0.23697917"  IS that ACTUAL SIZE??

 

 

 

 

Message 9 of 19
robyn.henke
in reply to: Libbya

Sorry.

 

As I said, I am self-taught by what had been done previously and that was to create these blocks at 1/8" scale and scale them down by 1/96 and then use the !hvds command to scale them.  I didn't question it at the time, I just went with it because it worked and why mess with a working thing.

 

So, yes, the macro is scaling (!hvds) the block.  As I also mentioned, I didn't really want to mess with any of the macro language unless absolutely necessary, but I see it may finally be necessary to start updating those as well.

 

I have changed the vav box blocks to be actual size, taken the !hvds out of the macro, replaced it with a 1 and made the block annotative and it is working as I thought it should.

 

So, any blocks I have that are a set size, I can do this with to make things easier.

 

The only other block I would have an issue with now is one that is a booster coil.  The routine asks for the size of the booster coil and then the insertion point.  The problem is, at 1/8" scale, again, the width of the booster coil is correct, which is 4".  When I run the routine at 1/4" scale, the width ends up being 2". 

 

Again, the macro is scaling with !hvds.... that seems to be how most of the macros we currently use were written 27 years ago.

 

I am also having this problem with a linear diffuser.  The user is prompted for the length and the width of the diffuser is always 4".  At 1/4" scale, it comes in at 2".

 

How do I solve the problem when the user is prompted for one dimension and the other dimension is a set one?

Message 10 of 19
Libbya
in reply to: robyn.henke

I would redraw the booster coil block to actual size, remove the scaling from the macro and then add a linear parameter with stretch/move/scale actions as needed for the user modified dimension.  If you want to post up the booster coil or diffuser block I can add the necessary parameter/actions as an example.

 

 

 

Message 11 of 19
robyn.henke
in reply to: Libbya

Here is the booster coil block.

 

Thanks!

Message 12 of 19
rapidcad
in reply to: robyn.henke

I know i may be late to the discussion, but I can see why there's confusion. I've updated older menu systems before, and converted others to dynamic block systems as well. Also, I've worked over 25 years in the AEC world, most as a CAD manager, a few as an HVAC drafter, so I understand where you are coming from and where you are trying to go.

 

I believe your core issue is with a system variable that was introduced around 2008 or 9, IIRC, called INSUNITS. When Autodesk rolled out the Annotative property, they had to create a few new variables to handle all the different ways users might need to set things up.

It is related to two other system variables introduced along with it, INSUNITSDEFSOURCE and INSUNITSDEFTARGET. The three work in concert with each other - look them up in the help system and see if you need to set these variables correctly to insert the old (pre-annotative) way.  You can set these system variables in your lisp file before you do the insertion, then reset the system variables to the previous settings once you are done by using a custom variable within your lisp file to hold and set values. For example:

Somewhere ahead of your insertion code: (setq tempinsunits (getvar "insunits"))  --this will catch your current setting.

Then change the setting: (setvar "insunits" 1)

Then after your insertion: (setvar "insunits" tempinsunits )

 

If you have a few blocks that consistently misbehave, it might be that their insertion scale is not set correctly within the block file.

 

ADN CAD Developer/Operator
Message 13 of 19
robyn.henke
in reply to: rapidcad

That was very helpful! 

 

I could never understandy why funny things started happening with all of our routines/menus/toolbars.

 

I do really appreciate the extra help and knowledge.

Message 14 of 19
Libbya
in reply to: robyn.henke

Here's the booster coil with a dynamic stretch added.  I scaled it 96 which made the height 4 and the width 12.  I assumed the 4 was correct per your description.  The hatch is annotative, so I added the stretch action to the lines that form the boundary.    

 

I remember back in 2008 or whenever it was they added annotation scaling, I had to rework some office LISP routines due to the system variable changes that rapidcad referred to.   

Message 15 of 19
robyn.henke
in reply to: Libbya

The booster coil block works perfectly.

 

Could you possibly help me with the linear diffuser block as well?

 

I was going to have the block be a standard 48" x 4" block because that is typically what we use.  But, once in a while, we do use 24" x 4" diffusers.

 

I created a stretch action on the block.  Is there a way to only allow a stretch of 24" to make it a 24" x 4" diffuser?

 

I noticed that it is hard to control how much stretch is being applied... does that make sense?

 

I have attached the block as I have it now.

 

I do prefer learning things for myself, I retain them better that way.  If you could just nudge me in the right direction and let me have a go at it, I'd appreciate it.  I disected the booster coil block to understand what you did there, so I think I understand the simple stretch action now.

 

Thanks for any help you can give me!

Message 16 of 19
ojuris
in reply to: robyn.henke

hi!

 

in your case I think beeter is attach linear parameter from one end to other, not from middle to end

if you need only 2 exact lengths You can define these lenghts for linear parameter (look at linear parameter properties under Value Set)

 

Regards

Juris

Message 17 of 19
robyn.henke
in reply to: ojuris

That is what I wanted, but I have no idea how you got that small line in the middle as a reference for the 24".

Message 18 of 19
Libbya
in reply to: robyn.henke

I agree with Ojuris, go end to end.  I would also only use 1 grip instead of two.  Select the parameter and right-click.  Under Grips set it to 1 and exit.  Move the end that now does not have a grip onto the origin.  move the grip to the far right side.  Delete your existing stretch action (it is associated with the parameter base point rather than end point) and add a new one that uses the grip side of the parameter.  Select the parameter again and go to properties.  Under value set, under dist type, select increment.  Input 24 under increment.  Input 48 under maximum.  Input 24 under minimum.

 

When you select a grip you can then enter the distance in at the command line.  Also when you select a block, the custom properties are editable on the properties palette (provided the parameter has Show in Properties = Yes).   That gives a couple other options for accurately inputting values.

Message 19 of 19
robyn.henke
in reply to: Libbya

Wow... I have so much to learn about dynamic blocks.

 

Thank you so much!  Both you and Ojuris.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services