Hi all,
I need a lisp sub-function that can empty all attributes of a specified dynamic block. The idea being that the specified block contains data that changes often and in order to repopulate the block's attributes with new data to replace the old I wish to just blank out the old data first, because it's possible that the new data may not utilize as many attributes and all of the old data must be removed.
The thing is the block I'm after is on several layouts, CTABs and they all need to be wiped clean.
Please and thank you
I have tried the following steps and it was quite successful.
1. Use FILTER to select all concerned blocks. When it prompts to select objects, type "ALL" to select blocks in all layouts.
2. Use ATTOUT to export selected block attribute information as a file. When it prompts to select objects, type "P" to use the selection set made in Step 1.
3. Use MS Excel to edit the attribute information file, Keep the first row and left-hand two columns and clear contents in all other cells. (Select these cells then press DELETE key). Save the file.
4. Back to AutoCAD, use command ATTIN to import the file you just saved.
You need have Express Tools installed to use command ATTOUT and ATTIN.
@mid-awe wrote:Hi all,
The thing is the block I'm after is on several layouts, CTABs and they all need to be wiped clean.
I dont see any reason why CTAB would be a problem. Not if your using autocad native commands then you will need to run thru the tabs with layoutlist function.
or probably your ssget filter mode:
(ssget "_X" (list '(0 . "INSERT")'(66 . 1)(cons 1 "Blockname"))(cons 410 (getvar 'Ctab))) ;<--- or something to that efffect.. which only sellect target objects on the current tab
Could be, who knows, unless you post your code here mid-awe.
@mid-awe wrote:
My code is too ugly to post right now, but I'm looking for a generic sub-function that I can call with maybe two arguments, block-name & attribute-number where to begin.
Thank you.
Change attribute multiple paper space tabs <--- look here
@mid-awe wrote:
Thank you. I was unable build the generic function that I was looking for because I do not know how to acquire the tag names, but I did build a little wrapper for chgatt function to target the specific blocks I need to reset to blank.
So you're good mid-awe? no need for modification? I guess you got it covered then.
Cheers
@mid-awe wrote:Hi all,
I need a lisp sub-function that can empty all attributes of a specified dynamic block. The idea being that the specified block contains data that changes often and in order to repopulate the block's attributes with new data to replace the old I wish to just blank out the old data first, because it's possible that the new data may not utilize as many attributes and all of the old data must be removed.
The thing is the block I'm after is on several layouts, CTABs and they all need to be wiped clean.
Please and thank you
If this is something that you depend on quite often, you're far better off having your attributed dynamic block reference Sheet Set Manager (SSM) Custom Properties, as this allows you to change the data items in SSM without openeing any drawings at all and can then immediately be published. Done.
I use this with out title block (which is also dynamic to allow for different sheet types), and this methodology has been invaluable... One project alone was +/-550 sheets, and I'd simply close all drawings, change the necessary properties, and then publish. Lemon squeezy.
"How we think determines what we do, and what we do determines what we get."
@BlackBox_ wrote:Sheet Set Manager (SSM) Custom Properties, as this allows you to change the data items in SSM without openeing any drawings at all and can then immediately be published. Done
Really? wow. i have to look into that. never realized ACAD2009 have that Sheet Set capability 😄 its been a long time since i browse thru the menu's [i'm so retarded]
Thanks for the info BlackBox.
@pbejse wrote:
@BlackBox_ wrote:Sheet Set Manager (SSM) Custom Properties, as this allows you to change the data items in SSM without openeing any drawings at all and can then immediately be published. Done
Really? wow. i have to look into that. never realized ACAD2009 have that Sheet Set capability 😄 its been a long time since i browse thru the menu's [i'm so retarded]
Thanks for the info BlackBox.
You're welcome... Ctrl+4 is your friend. :beer:
SSM is a fantastic tool that hasn't really changed since +/-2006? It's really good at what it does do, and it has some pretty blatent gaps... For tasks such as this, it's quite powerful, which is why I've been using it for every project since learning of its capabilities (small or large).
It requires some planning, obviously, because each attribute in one's title block, for example, needs to be correctly mapped to the correct SSM Custom property by Field. The implied tasks are to keep SSM Custom Properties organized by naming convention, and to remember to specify the correct case for the Field value (so if you enter upper or lower case in SSM custom property, the title block still looks right), etc..
I hope others find this method to be as useful as I have.
Cheers
P.S. for the developers - SSM API features are only exposed to VBA, and .NET API. For more information, see the Overview of Sheet Set Manager Objects (SSO) developer reference.
"How we think determines what we do, and what we do determines what we get."
@pbejse wrote:never realized ACAD2009 have that Sheet Set capability 😄
My favorite things about 2009....
PUBLISHCOLLATE System Variable, and the LayerState-* LispFunctions were introduced... Later with SP1 (maybe SP2?), the Ribbon became editable via CUI Editor (you couldn't edit its contents at all previously, just it's displayed position).
[Edit] - Oh! And the death of Land Desktop - hooray beer!!!
/WalkDownMemoryLane
"How we think determines what we do, and what we do determines what we get."
@BlackBox_ wrote:
@pbejse wrote:never realized ACAD2009 have that Sheet Set capability 😄My favorite things about 2009....
PUBLISHCOLLATE System Variable, and the LayerState-* LispFunctions were introduced... Later with SP1 (maybe SP2?), the Ribbon became editable via CUI Editor (you couldn't edit its contents at all previously, just it's displayed position).
[Edit] - Oh! And the death of Land Desktop - hooray beer!!!
/WalkDownMemoryLane
Nice to know ACAD2009 is not really that ancient 🙂 All this time i thought the only new stuff here are DBlocks and Annotative objects i'll be more observant from now on. But then again, not really a heavy CAD user. just the basic stuff and some lisp programming .. [ yeah right!!!]
Cheers BlackBox :beer!
**//Off Topic//**