I often create many drawing sheets for each mold I design. I would like to be able to fill in one title block and click a button to fill in the rest of the title blocks automatically. In autocad I have a lisp routine that updates the same attributes in each title block. I thought maybe someone had made an API program that did something similiar.
The problem with using custom properties is that I often will have more than one component for the mold on the same sheet. Also, I would have to fill in all of the same info for each component of the mold. I would rather just fill in one title block then run a macro or something to fill in the rest of the title blocks. Does anyone know if it is possible to access attributes in the API?
Yes it is possible to set and read attributes in API. Here is an example. This sets fields on my form to the values in the block passed to the function.
Public Sub GetCurrentAttributes(BlockName As SldWorks.BlockInstance)
Of course you will first have to attach to SW the Document and the correct instance of the block (which would have to have the proper field names setup.)
You could also save out your sheet format and apply it to each sheet the only problem is that if there are changes to individual sheets they will be hard to manage.
What I do is keep the same title block for every sheet. That means every sheet uses the same sheet format for that mold. I also will often detail several components on one sheet. I have a note that labels every part. The custom properties will reference the properties of the part that the annotation is attached to. I guess what I am talking about is a mini-title block for each compenent detail.
jk
" I often create many drawing sheets for each mold I design. "
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.