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

Set Dynamic Block Properties Table through lisp without "Custom" properties.

5 REPLIES 5
Reply
Message 1 of 6
rapidcad
3021 Views, 5 Replies

Set Dynamic Block Properties Table through lisp without "Custom" properties.

Hi all - maybe you already knew this, but I searched this out here and a few other sites and I never saw a way to do this. I have (with much help from others and gleaning this and other forums) cobbled together a dynamic block insertion menu which runs lisp through palette command tools to insert our library of dynamic blocks while using a "front-end" dialog box to pre-set the common variables for our blocks - things like width, style of framing and certain other "family" characteristics. One of the objectives is to be able to pull the data regarding all these parameters later using programming to export the data for bill of materials generation and project management. That's where I was having issues finding a solution.

 

When vlisp is used to change a dynamic block' block property table, there are a few things to keep in mind. First off, because I couldn't figure out another way to do it, I don't modify the block table directly, I modify each parameter in sequence from left to right in order. What I was getting was the correct look from my blocks but when inspecting the properties, all the parameters related to the block property table were set to "custom". Those custom values were in fact the correct length or angle or view or whatever, but because they were not accessed through using the block table grip they were reading "custom". I tried checking the box at the bottom of the block properties table dialog box that reads "Block properties must match a row in the table", and that did in fact allow me to read the actual data of each parameters' value correctly. Block Table 1.JPG

 

However, my dynamic block parameter modifying lisp no longer changed the parameter values. They were still perfectly editable through the traditional grip, but not through programming. That' s when through trial and error, I found out that we can turn that off and use the row that appears below to accomplish this. There is a row of defaults that can be set at the bottom of each table column labeled "Default value when properties do not match table:" They usually default to "Custom". I figured out that if I chaged each one to "**Last**" (right-click on each cell) I can both programmicly change and data read the parameters correctly.

Block Table 2.JPG

 

Now the block behaves correctly and allows for values to be set through lisp and reported through listing or block data exporting and inspection lisp.

 

Hope this helps someone understand this (perhaps undocumented) feature. I couldn't find anything searching in "all books" for "BTable" in the AutoCAD 2011 help.

ADN CAD Developer/Operator
5 REPLIES 5
Message 2 of 6
SerhanB
in reply to: rapidcad

Hi there, 

could you please tell us how exactly did you manage to read the parameters from block properties table?

thanks

Serhan BAKIR
http://www.stand.com.tr/
Message 3 of 6
rapidcad
in reply to: SerhanB

Serhan, I think this post is the one where I got the breakthrough in reading my block properties tables from dynamic blocks. I couldn't have done it without help from several people on the forum, especially Lee Mac, kent Cooper and Ian Bryant.

 

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Filtering-the-results-of-a-safearray-...

 

Hope this helps answer your question,

 

Ron

ADN CAD Developer/Operator
Message 4 of 6
SerhanB
in reply to: rapidcad

Hi Ron,

Thanks for quick reply, I have managed to fetch currently assigned values of the table by following the post you have mentioned. However I'd like to read all of the data contined in the block properties table. I think I need to follow a different path. 

Thanks 🙂

Serhan BAKIR
http://www.stand.com.tr/
Message 5 of 6
vsrisaichaitanya
in reply to: rapidcad

How to change block property table parameter value..using lisp..?

Message 6 of 6
rapidcad
in reply to: vsrisaichaitanya

Have you tried the link that I posted earlier in this thread? Lee Mac wrote a very good Dynamic Block propety manipulating function that I just tailored to work for my own situation. You could do the same.

 

Best regards,

Ron

ADN CAD Developer/Operator

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

Post to forums  

”Boost

 

”Tips

 

”Services