Visual Basic Customization

Visual Basic Customization

Reply
Valued Contributor
gizmowiebe
Posts: 57
Registered: ‎10-21-2003
Message 1 of 2 (149 Views)

Alternative for my current method of retrieving beam (solid entity) lengths.

149 Views, 1 Replies
08-27-2012 05:31 AM

Hi There,

 

for years I have been using an VB program to retrieve beam (simple quare block with scaled Z value) lengths from modelspace. In modelspace a construction is shown made out of three different blocks. 90x90xL, 90x45xL and 45x45xL. where L is a scale Z dimension. The method I use I describe also in the tutorial below:

 

http://www.visiblevisual.com/jupgrade/index.php/autocad-vb-vba/26-draw-beams-and-get-parts-list-with...

 

This method works good but has a big few setbacks. 

1. I cannot use flatshot or create other 3d views showing the beams. They are simply left out

2. To change the length I cannot use 3DSTRETCH (or pull an arrow) but I need to go into properties and change the Z scale.

 

What I'd like to accomplish?

 

a. Could I replace my blocks by a BOX entity (or extrusion) to create beams. (I know AutoCad doesn't allow to retrieve Solid Extrusion geometric values. So I guess this is no option.

b. Would it be possible to create a dynamic block from a 3d extrusion with a LENGTH value. (If this is possible than I need some input in how to do so. I've looked but didnt founds a solution like this')

c. Any alternatives I havent thought of. ....

 

Help is appreciated. I hope one of you can provide me with a clever solution. 

 

Thanks in advance,

 

Wiebe

 

 

 

Distinguished Contributor
SEANT61
Posts: 126
Registered: ‎09-23-2008
Message 2 of 2 (122 Views)

Re: Alternative for my current method of retrieving beam (solid entity) lengths.

09-04-2012 12:37 AM in reply to: gizmowiebe

See this link:

 

http://www.cadtutor.net/forum/showthread.php?37494-getting-3dSolid-Box-properties-using-VBA.../

 

I attached a VBA sample routine (post # 10) that does a pretty good job for generic rectangular solids.

 

 

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.