Help from a newbie...Please

Help from a newbie...Please

Anonymous
Not applicable
754 Views
9 Replies
Message 1 of 10

Help from a newbie...Please

Anonymous
Not applicable
Ok I have a project at work that would much easier if A2K was customised. I do have an understanding of the basic logic of VBA but I would appreciate any tips on laying out a project prior to actual programming.
Basically I need to get user info on cabinet dimensions and from that create a cabinet. I'm just not sure on creating boxes and copying them to the correct width and such. Help please.....
0 Likes
755 Views
9 Replies
Replies (9)
Message 2 of 10

Anonymous
Not applicable
A couple of questions,
1) Are these cabinets standard sizes that your company uses or will
there be significant changes in dimensions each time?

" I'm just not sure on creating boxes and copying them to the correct
width and such."

2) How detailed do you intend to make them, are they simply boxes or
will they show doors, handles, inlays, ect. ?
3) Are you planning on single entities or do you want blocks that can be
moved around in the drawing as a single entity?

-Josh

Calgon wrote:

> Ok I have a project at work that would much easier if A2K was
> customised. I do have an understanding of the basic logic of VBA but I
> would appreciate any tips on laying out a project prior to actual
> programming.
> Basically I need to get user info on cabinet dimensions and from that
> create a cabinet. I'm just not sure on creating boxes and copying them
> to the correct width and such. Help please.....
0 Likes
Message 3 of 10

Anonymous
Not applicable
The cabinets will have sides, top, bottom, backs, doors including options for door style eg frmaed , mullions , custom insert.etc.
The doooors have to be able to "open so that a detailed view of the interior can be shown...adjustables fixed shelves lights etc.


THey threw me to the wolves I swear ...but I want walk out unscathed...any help and suggestions for a vba padawan would be great...



Calgon
0 Likes
Message 4 of 10

Anonymous
Not applicable
"The doooors have to be able to "open so that a detailed view of the
interior can be shown"

You said a2k in your original post, but are you talking about 2d or 3d
here? a2k or mdt?

It sounds to me like you're about to attempt to write an entire software
package 🙂 In which case, the first thing you will have to do is list
all the possible options you want and how many choices you have for each
option. Then determine if user input for those options will be best
accomidated via option buttons, comboboxes, textboxes, ect. How many
forms you will need,,,, how you plan on inserting them,,,,, the list
goes on. You may want to develop a macro that inserts a single complete
cabinet first to make sure you can do what you want, then develop the
forms. You will be able to set variables or properties in your forms
that can be used as arguments for the sub later,,ie- size, ect.
Without knowing what you want the final outcome to be, it's difficult to
give you mush more direction than that, but if you want to open and
close doors, it sounds like your're looking at solids and the wolves may
be nipping at your heels already.
-Josh

Calgon wrote:

> The cabinets will have sides, top, bottom, backs, doors including
> options for door style eg frmaed , mullions , custom insert.etc.
> The doooors have to be able to "open so that a detailed view of the
> interior can be shown...adjustables fixed shelves lights etc.
>
> THey threw me to the wolves I swear ...but I want walk out
> unscathed...any help and suggestions for a vba padawan would be great...
>
> Calgon
>
0 Likes
Message 5 of 10

Anonymous
Not applicable
Yes I had a feeling it woud get that difficult. I use Autocad 2000. The dwgs are 3D. The cabinets are our company's specifics.

About developing a macro...I can create a cabinet Side no problem...but then telling the program to copy it a certain distance (user defined width of box) away is my first hurdle...


With regards to the lay out yes it will have option buttons and and such...


Oh yes the coup de gras...the individual pieces have to be converted into a bill of material list as well....Aughh...

I really don't mind the project...there's a year deadline but the sooner it's off my plate then I can stress less....
Again they gave me this as I was the only Cad operator in the place..."You can draw, You figure it out " attitude...
Thye also want toolbars and multiple views when plotting...

Thankfully the only they do not want to do (I hope) is renderings. Can this all be accomplished...and can I get tips and pointers from everyone here?

Appreciating all help that you can throw my way.
0 Likes
Message 6 of 10

Anonymous
Not applicable
First tip,,,,

Always save references to entities you create. Don't just use the
function by itself.

Instead of:
thisdrawing.modelspace.addline pt1, pt2

use:

set lin = thisdrawing.modelspace.addline (pt1, pt2)

It will make your copying, ect. easier

set lin2 = lin.copy
lin2.move thispoint, thatpoint

As far as the whole 3d thing, you might want to discuss with the
higher-ups about upgrading to a package that goes beyond boolean solids.
Then check with the inventor gurus to see if they're happy with the
object model provided. There have been problems concerning vba
limitations in mdt mentioned on this ng.
-Josh


Calgon wrote:

> Yes I had a feeling it woud get that difficult. I use Autocad 2000. The
> dwgs are 3D. The cabinets are our company's specifics.
>
> About developing a macro...I can create a cabinet Side no problem...but
> then telling the program to copy it a certain distance (user defined
> width of box) away is my first hurdle...
>
> With regards to the lay out yes it will have option buttons and and such...
>
> Oh yes the coup de gras...the individual pieces have to be converted
> into a bill of material list as well....Aughh...
>
> I really don't mind the project...there's a year deadline but the sooner
> it's off my plate then I can stress less....
> Again they gave me this as I was the only Cad operator in the
> place..."You can draw, You figure it out " attitude...
> Thye also want toolbars and multiple views when plotting...
>
> Thankfully the only they do not want to do (I hope) is renderings. Can
> this all be accomplished...and can I get tips and pointers from everyone
> here?
>
> Appreciating all help that you can throw my way.
>
0 Likes
Message 7 of 10

Anonymous
Not applicable
Like the previous reply I would be seriously tempted to look at other software. I'm not saying it would be impossible in autocad but I for one certainly wouldn't want your task. I'd be tempted to start looking at Pro Engineer ar similar where you can define relationships between objects which would make the whole task a lot simpler..... Good Luck
0 Likes
Message 8 of 10

Anonymous
Not applicable
I wish...Unfortunately they have other things tied to Autocad and want to keep it "All in the Family"
many of our machines read the floor plans and then do the custom work from them...all autocad based.

So I do what they command...I'm up for the challenge...out of curiosity...is their a way to print all the activex and VBA refeence files and examples in one shot? I have been clicking each topic then printing....very tedious....
0 Likes
Message 9 of 10

Anonymous
Not applicable
I don't envy your position as a 'newbie' This project sounds difficult. I
agree that it could be done. And the higher-ups attitudes, "You can draw,
you figure it out" is not very fair.

I would, if at all possible, use blocks since you stated the cabinets are
your companies specifics.

Good luck!
0 Likes
Message 10 of 10

Anonymous
Not applicable
I'm postin what I have started based on the example of creating a box...I modified to taake user input...I try to copy based on the Copy circle example(not included in the project got a littl flustered) but it kept rejecting it...Based on what I have here...can some one show a viable copy ...Example If your cabinet is 600mm wide and the sides of your cabinet are 19mm. the initial box should be 19mm and the second box should be copied 581mm away. I know I'm asking very easy things I'm sure...but it's just eluding me a wee bit.
0 Likes