I am in need of a good way to automatically fill in title blocks. Examples, part descriptions, drawn by, dates. This can be a macro or some other good way of doing this.
I appreciate any help i can get with this
the easiest and most common way to set it up is to have notes in the sheet format that are linked to the file properties of the model in the drawing. check out the help to get started. and come back here when you have questions.
Yes - what you want to read up on in the help files are "Custom Properties". These will allow to streamline the process greatly.
I am attaching a format template for you to look at and maybe use as a
starting point for what you need to do.
When you go to edit sheet format (RMB) you will see all of the code.
I appreciate everyones replies to my question. We already have the title block linked to the custom properties. I dont think i really explained what I am needing very well so I will try to do better this time. I have got a program for a parallel nozzle that lets the user pick the size of the nozzle the length and the angle that they want the pipe cut at. When the user picks these things the program already knows what flanges to use on it and it automatically builds the nozzle and updates the drawing to match. I have figured out how to get the bill of materials to update also. So what i am really needing is to figure out how to write some code for the title block that will automatically do part numbers and descriptions for me so that the user will never have to touch it. Example. Lets say i have a 10" Nozzle that has got a 24deg. with a 150# RF flange. I want to code it in so when the user specifies what they want the program will know that the description of that part with be.
10" DIA. PARALLEL NOZZLE
(24 DEG.) W/ RF FLANGE
I know i am going to have to hard code some stuff in but i can set variables for the deg and type of flange.
are you using a design table, an add-in, a macro, or something else to drive the assembly?
I am using a macro.
well, drat. I knew how to do it in a design table...
yeah this is the third time i have posted this and havnt found anyone who knows how to do it through a macro. I am new at this code writing stuff so im at a loss on it myself
have you posted it in the API section?
yeah i actually posted there last week and never got any hits on it
do you know much about VB?
not a thing, sorry.
I wouldn't go down the VB trail because from what I hear 2010 is the last version Solidworks will support
Scott McFadden wrote: I wouldn't go down the VB trail because from what I hear 2010 is the last version Solidworks will supportVB.
Scott McFadden wrote:
Hey Scott... where did you hear this?
We use VB macros pretty extensively.... that would be a big blow.
When I was using VB as a tool for automatically fill in my titleblocks and I was having issues
with one aspect of it, my VAR told me this saying I was better off using the Tab Builder which
I have since switched to.
What is the Tab Builder?
the property tab builder installs with SW. it makes a form that displays in the task pane for entering custom properties.
Where Jeremy showed you how to get to it. Once you have created an outline
for parts adn assemblies you can see it inside of the Solidworks program here.
Don't believe the rumors. SolidWorks Corp will make the announcements, and will give the user base plenty of time for notice. It's not going to happen "end of this year" or "next year".
Follow me on Twitter
With so many threads on this sight saying that we should check with our VAR
and this is one that I did on and this is what they said. VB will not be supported
after 2011 and maybe as soon as 2011.
They said Solidworks is phasiong it out.
Maybe someone from Solidworks on this thread can confirm that or put to bed this
so called rumor.
The rumor is 6 years old. It gets restated every year. The truth of the matter is that the VARs don't know any sooner than the rest of us. If/when SolidWorks does choose to remove support for VBA, there will be multiple years ahead notice. My personal opinion is that removing support (without a replacement) for the uncompiled macro language would be like SolidWorks shooting themselves in the foot. Microsoft can get away with it, but not a CAD application.
Wow, kinda of makes it difficult to know what to believe out of them then.
Funny how I got the initial VBA program bases function from them less then 6 years ago.
Sorry if I offended you. Wasn't trying to. Just standing by what I was told by them.
This link may help you.
Great tip Michael!
Jacob, you might also want to look at DriveWorksXpress which is built in to SolidWorks.
If you want to continue down the custom VB macro path, you can use the VB string concatenate functions to build a custom property that takes the input values from your macro to built part number and descriptions.
We had actually started this program out with driveworksxpress but it is to my understanding that xpress is pretty limited on how many variables/parameters you can build into your program, and to achieve what we needed to we would need to buy the full blown version of it.
You may want to try this link. Scroll down to find "FixAltPartNo" or "PartNoProperty" one of these macros may get you going in the right direction.
Yes, much different then your first request.
This is out of my league. You shopuld have files this thread under API.
I had it posted there last week and didnt get any hits so i posted it here
Fair enough. I have had postings myself and sometimes until I restirr it up I don't get any responses.
It may have been when you had it posted there because of your explaination users were thinking you were
in the wrong area. Your second explaination speaks more to API then your first.
Retrieving data ...