Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

General question on Dynamic Blocks

1 REPLY 1
Reply
Message 1 of 2
Gary_J_Orr
183 Views, 1 Reply

General question on Dynamic Blocks

When (Acad version and drawing platform) were Dynamic Blocks first introduced? I guess I'm getting old and my memory fails me it would seem 😉

 

I see several posts about gathering modified Dynamic blocks ("`*U*") for a given block name that use ActiveX methods, specifically using the "effectiveName" property... and often people suggest a fail-over of checking to see if the property exists prior to calling for it, and if it doesn't exist then return the "Name" property to keep the routine from failing... but it makes me curious...

 

Did Dynamic Blocks exist before the effectiveName property was exposed/created for ActiveX? I know that the property has existed since the 2006 release (on the 2004 drawing platform).

 

My question is really as to why bother with the failover as you process each block in the selectionSet? A version check prior to attempting the collection of the blocks would make much more sense as it would allow you to bail-out before stepping through the selectionset at all.

 

But more: if Dynamic blocks existed before the property was created/exposed in ActiveX, the currently often used failover (using the "Name" property) would only return the name that was passed to it to begin with (the "*U..." block name) wouldn't it? If so, then why bother with it, again, for the same reason, you would be wasting your time iterating over the selection set... or am I way off base... did the "Name" property prior to the introduction of the "EffectiveName" property return what is now the effectiveName (IE the name of the original block definition)?

 

I'm Extreeeeemly curious. I know that it is possible to get the name of the originating block definition without ActiveX properties but don't want to bother introducing a mixed bag of methods if I don't need to.

-Gary

Gary J. Orr
(Your Friendly Neighborhood) CADD/BIM/VDC Applications Manager
http://www.linkedin.com/in/garyorr

aka (current and past user names):
Gary_J_Orr (GOMO Stuff 2008-Present); OrrG (Forum Studio 2005-2008); Gary J. Orr (LHB Inc 2002-2005); Orr, Gary J. (Gossen Livingston 1997-2002)
1 REPLY 1
Message 2 of 2
Gary_J_Orr
in reply to: Gary_J_Orr

Nevermind... I found the help files for 2006... the activeX property is there in the ActiveX reference and the help files for the application warns that editing a dyn block definition in any earlier version will result in a loss of all dyn block functionality... therefore: a quick test for acadver will keep from ever entering the loop of searching "*U*" for name matches at all (as oppossed to providing a failover while in a useless loop):

(if (>= (atof (getvar "ACADVER")) 16.2)
...if yes, do loop to search for "*U*" blocks with EffectiveName to match requested block name...
...else just get blocks with requested name...
Gary J. Orr
(Your Friendly Neighborhood) CADD/BIM/VDC Applications Manager
http://www.linkedin.com/in/garyorr

aka (current and past user names):
Gary_J_Orr (GOMO Stuff 2008-Present); OrrG (Forum Studio 2005-2008); Gary J. Orr (LHB Inc 2002-2005); Orr, Gary J. (Gossen Livingston 1997-2002)

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

Post to forums  

Autodesk Design & Make Report

”Boost