Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Separate Drawings For Each Model? 5

Status
Not open for further replies.

edreaux

Mechanical
Feb 7, 2006
89
I have been keeping all of my project drawings within one file. (One drawing file per project) This means that a large assebmly will have many drawing sheets in the drawing file. - Is this typical swx practice? If so how can you switch from different sheets without scrolling to find the tab?

Thanks.
 
Replies continue below

Recommended for you

That did it. It works perfectly for me without the auto size.
Thanks
 
I think I've found the issue with autosizing. I was setting the list box heights and then using the height property later to calculate positions and the overall form size. What I believe was happening was that the command to set the heights wasn't getting fully processed by the form before I queried it later in the macro. Not only was I getting erroneous data back to calculate other heights, I believe the querying itself was disrupting the setting of the height, so nothing looked right at all! I thought I had fixed it by moving the querying code to the end of the macro, but I guess it depends on your PC how fast each bit of processing goes. To make a long story short, I've now changed to storing the list box height in a variable rather than querying after setting, so the autosizing should work now. I also added an event handler to automatically refresh the form whenever a file is opened. It works when you open a file with either the open dialog or right-click on a component in an assembly or drawing and choose "Open [Part/Assembly]", even if that document is already open but "hidden" (does not have a window). However, it will not refresh if you have a macro/program that shows an "open but hidden" document with the ActivateDoc method. In that case you'll have to hit the refresh button. Enjoy!

(OOPS! I almost forgot to link to the file!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor