Author Topic: Attdisp Normal vs ON  (Read 9209 times)

0 Members and 1 Guest are viewing this topic.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Attdisp Normal vs ON
« on: April 29, 2010, 12:26:30 PM »
OK, this is totally baffeling me.  I have 2 instances of the same block, 1 has an attribute visable, one does not (in Normal mode).  If i set attdisp ON, they both show.  If I go back to Normal, only one shows.  How is this possible?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Attdisp Normal vs ON
« Reply #1 on: April 29, 2010, 12:32:02 PM »
Attribute modes control the behavior of attributes in blocks. For example, you can control

Whether an attribute is visible or invisible in the drawing
Whether an attribute has a constant value, such as a part number
Whether the attribute can be moved relative to the rest of the block
Whether the attribute is a single-line attribute or a multiple-line attribute
If an attribute has a constant value, you will not be prompted for its value when you insert the block. If an attribute has a variable value, such as the asset number of a computer, you will be prompted when you insert the block.

fix with BATMAN

You can edit the values and other properties of all attributes that are already attached to a block and inserted in a drawing.

You can modify attributes in block definitions with the Block Attribute Manager. For example, you can modify the following:

Properties that define how values are assigned to an attribute and whether or not the assigned value is visible in the drawing area
Properties that define how attribute text is displayed in the drawing
Properties that define the layer that the attribute is on and the attribute line's color, weight, and type
By default, attribute changes you make are applied to all existing block references in the current drawing.

« Last Edit: April 29, 2010, 12:35:58 PM by Spawn »
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Attdisp Normal vs ON
« Reply #2 on: April 29, 2010, 12:38:08 PM »
by hep file definition:


Normal
Restores the visibility settings of each attribute. Visible attributes are displayed. Invisible attributes are not displayed.

On
Makes all attributes visible, overriding the original visibility settings.

Off
Makes all attributes invisible, overriding the original visibility settings.

Be your Best


Michael Farrell
http://primeservicesglobal.com/

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #3 on: April 29, 2010, 12:42:12 PM »
yes, I got all that, but how can it be 2 different ways at the same time?  DL the file and look at it
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Attdisp Normal vs ON
« Reply #4 on: April 29, 2010, 12:44:42 PM »
someone edited one...and did not sync things up

Update Block References

You can update attributes in all block references in the current drawing with changes you made to the block definition. For example, you may have used the Block Attribute Manager to modify attribute properties in several block definitions in your drawing but elected not to automatically update existing block references when you made the changes. Now that you are satisfied with the attribute changes you made, you can apply those changes to all blocks in the current drawing.

You can also use ATTSYNC to update attribute properties in block references to match their block definition, or to update a block instance after you redefine a block attribute using BLOCK, -BLOCK, or BEDIT.

Updating attribute properties in block references does not affect any values that have been assigned to those attributes.

Be your Best


Michael Farrell
http://primeservicesglobal.com/

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #5 on: April 29, 2010, 12:56:45 PM »
I see what your saying, but what a PITA that would be.  That means they would have to insert 6 of these blocks, then edit the definition, and insert the next 200.
and its not just 1 drawing, but like 125
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #6 on: April 29, 2010, 01:02:55 PM »
someone edited one...and did not sync things up

Update Block References

You can update attributes in all block references in the current drawing with changes you made to the block definition. For example, you may have used the Block Attribute Manager to modify attribute properties in several block definitions in your drawing but elected not to automatically update existing block references when you made the changes. Now that you are satisfied with the attribute changes you made, you can apply those changes to all blocks in the current drawing.

You can also use ATTSYNC to update attribute properties in block references to match their block definition, or to update a block instance after you redefine a block attribute using BLOCK, -BLOCK, or BEDIT.

Updating attribute properties in block references does not affect any values that have been assigned to those attributes.


Also, I tried to do what you did in RED, and cannot.  How would you do that?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Attdisp Normal vs ON
« Reply #7 on: April 29, 2010, 01:05:29 PM »
sounds like it could have happened just that way...

...could be a training issue (I'm sure you folks have standards)
...could be careless
perhaps instead of using normal EATTEDIT, they used the block editor to edit the attribute values?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Attdisp Normal vs ON
« Reply #8 on: April 29, 2010, 01:06:37 PM »
someone edited one...and did not sync things up

Update Block References

You can update attributes in all block references in the current drawing with changes you made to the block definition. For example, you may have used the Block Attribute Manager to modify attribute properties in several block definitions in your drawing but elected not to automatically update existing block references when you made the changes. Now that you are satisfied with the attribute changes you made, you can apply those changes to all blocks in the current drawing.

You can also use ATTSYNC to update attribute properties in block references to match their block definition, or to update a block instance after you redefine a block attribute using BLOCK, -BLOCK, or BEDIT.

Updating attribute properties in block references does not affect any values that have been assigned to those attributes.


Also, I tried to do what you did in RED, and cannot.  How would you do that?

that is straight from HELP file...I did not attempt to perform....
Be your Best


Michael Farrell
http://primeservicesglobal.com/

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #9 on: April 29, 2010, 01:07:20 PM »
Eack block instance enjoys its own collection of attributes. You know this because each non constant attribute sports its own state. That "state" extends beyond the value of the textstring property (dxf group 1) to the visibility / constant states etc (dxf group 70), the tagstring (dxf group 2) etc.

I've exploited this for years, creating as many attributes as I need per block instance (yes, you can vary the number, type and tags of attributes between instances of the same block def) toggling attributes between read-only | write-able, visible | invisible etc. on the fly, at will.

If I wasn't on my blackberry I'd post some sample code but alas.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Attdisp Normal vs ON
« Reply #10 on: April 29, 2010, 01:21:26 PM »
Attributes have an invisible property which can be true or false.  Here is a string of code that you can run to see what they are set to.

I wrote the code as one line, so that you can just hit the up arrow to use again in Acad.
Code: [Select]
(foreach i (vlax-invoke (vlax-ename->vla-object (car (entsel))) 'GetAttributes) (prompt (strcat "\nTag = " (vla-get-TagString i) ", Invisible = " (vl-princ-to-string (vla-get-Invisible i)))))(princ)

Returned for the left block
Quote
Tag = TERMDESC02, Invisible = :vlax-true
Tag = TERMDESC02A, Invisible = :vlax-true
Tag = WIRENO02A, Invisible = :vlax-false
Tag = WIRENO02, Invisible = :vlax-false
Tag = P_TAGSTRIP, Invisible = :vlax-false
Tag = WIRENO01A, Invisible = :vlax-false
Tag = TERMDESC01, Invisible = :vlax-true
Tag = TERMDESC01A, Invisible = :vlax-true
Tag = WIRENO01, Invisible = :vlax-false
Tag = DESC1, Invisible = :vlax-false
Tag = INST, Invisible = :vlax-true
Tag = TERM, Invisible = :vlax-false
Tag = FPT, Invisible = :vlax-true
Tag = LOC, Invisible = :vlax-false

Right block
Quote
Tag = TERMDESC02, Invisible = :vlax-true
Tag = TERMDESC02A, Invisible = :vlax-true
Tag = WIRENO02A, Invisible = :vlax-false
Tag = WIRENO02, Invisible = :vlax-false
Tag = P_TAGSTRIP, Invisible = :vlax-true
Tag = WIRENO01A, Invisible = :vlax-false
Tag = TERMDESC01, Invisible = :vlax-true
Tag = TERMDESC01A, Invisible = :vlax-true
Tag = WIRENO01, Invisible = :vlax-false
Tag = DESC1, Invisible = :vlax-false
Tag = INST, Invisible = :vlax-true
Tag = TERM, Invisible = :vlax-false
Tag = FPT, Invisible = :vlax-true
Tag = LOC, Invisible = :vlax-true
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #11 on: April 29, 2010, 01:43:16 PM »
I know that I can set the visability status on entities, my problem is the company I got this from, I dont think they are smart enough to do this.  So mostly I am trying to figure out how they could have done this with out of the box autocad
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #12 on: April 29, 2010, 01:44:51 PM »
I've exploited this for years, creating as many attributes as I need per block instance (yes, you can vary the number, type and tags of attributes between instances of the same block def) toggling attributes between read-only | write-able, visible | invisible etc. on the fly, at will.

But if I understand what your saying, you do this through code.  Can it be done w/o code?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Attdisp Normal vs ON
« Reply #13 on: April 29, 2010, 01:52:12 PM »
I think Acad Elec has some OOTB lisp routines that one can use to make attributes in/visible.  If that helps at all.

FYI..... Attributes have the Invisible property, and the Visible property.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #14 on: April 29, 2010, 02:27:42 PM »
Tim, can you get to the visible property w/o code?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Attdisp Normal vs ON
« Reply #15 on: April 29, 2010, 02:43:34 PM »
I don't see a way OOTB to change them once they are inserted, but you can change the ' attribute ' of the attribute definitions with ' battman '.  If you hit the ' edit ' button, the first tab is ' attribute ', and there is an ' invisible ' mode there that you could un/check.  I didn't see another way in '09.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #16 on: April 29, 2010, 03:12:46 PM »
I know that I can set the visability status on entities, my problem is the company I got this from, I dont think they are smart enough to do this.  So mostly I am trying to figure out how they could have done this with out of the box autocad

Do not underestimate the ability of the garden variety idiot to use code found on the internet he cannot write and similarly does not understand, neither in construct nor use.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #17 on: April 29, 2010, 03:15:15 PM »
Can it be done w/o code?

Not so much, unless you consider tools, like ET etc. to be created "w/out code".
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #18 on: April 29, 2010, 06:05:47 PM »
ET? I dont have ET as a command
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Attdisp Normal vs ON
« Reply #19 on: April 29, 2010, 06:11:53 PM »
[WAG]

ET=ExpressTools
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #20 on: April 29, 2010, 06:17:19 PM »
[WAG]

ET=ExpressTools

[●] correct
[ ] incorrect
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #21 on: April 30, 2010, 09:04:59 AM »
Express Tool, DUH!  I was thinking of the very old text editing command ET
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #22 on: April 30, 2010, 10:07:35 AM »
Couple drawings to demonstrate variable attribute properties.

ATTRIB_Example_1.dwg
ATTRIB_Example_2.dwg

Drawings are identical except for one thing.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #23 on: April 30, 2010, 01:25:59 PM »
MP, you did that through code?  Very cool
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #24 on: April 30, 2010, 01:55:54 PM »
Yes sir + thanks.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Crank

  • Water Moccasin
  • Posts: 1503
Re: Attdisp Normal vs ON
« Reply #25 on: May 01, 2010, 04:02:59 AM »
You don't have to do that through code. Change the properties of the attribute with the BEDIT command and insert the block again.

Nb. I also think it's dangerous to change attributes so they are different from the block definition: If someone uses ATTSYNC on that block the result could be affecting other (overlooked) blocks as well.
So if you want to do this through code, your program should have to replace the original block with a unique copy (something like Autodesk did with dynamic blocks: after the properties have changed they are replaced with an unnamed version of that block).
Vault Professional 2023     +     AEC Collection

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #26 on: May 03, 2010, 03:21:37 PM »
I also think it's dangerous to change attributes so they are different from the block definition: If someone uses ATTSYNC on that block the result could be affecting other (overlooked) blocks as well.

I've used the technique successfully for more than double the years that I've been on this board. It's as dangerous as placing any info in the drawing users can modify or delete.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Attdisp Normal vs ON
« Reply #27 on: May 03, 2010, 04:53:12 PM »
I know that I can set the visability status on entities, my problem is the company I got this from, I dont think they are smart enough to do this.  So mostly I am trying to figure out how they could have done this with out of the box autocad

Do not underestimate the ability of the garden variety idiot to use code found on the internet he cannot write and similarly does not understand, neither in construct nor use.
Did somebody call my name?  :lol:
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #28 on: May 06, 2010, 09:12:04 AM »
MP, what language are you using to edit those attributes?  Its funny how things happen.  I asked this question last week or so, and yesterday the BIG boss came by and said they were having a meeting about the titleblock and blah blah blah.  Bottem line, I have to make it so the users cannot edit the first line of the title block.  So Im thinking make it constant , somehow using what you have described.

thanks
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #29 on: May 06, 2010, 10:07:32 AM »
Vanilla LISP (entmake or DXF modification). The applicable properties are read-only to ActiveX, so vla-* yada will not work, neither will VB(A). I'll post some applicable code when I can sneak some time.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #30 on: May 06, 2010, 01:41:54 PM »
any chance .Net can touch it?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #31 on: May 06, 2010, 02:22:50 PM »
Doubtful, as I would guess the .NET interface honors the same intent as the ActiveX interface, i.e.the Constant property etc. is read-only.

However, if you go thru an ObjectArx wrapper you could probably make them squeal like a pig.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Attdisp Normal vs ON
« Reply #32 on: May 06, 2010, 03:36:57 PM »
Doubtful, as I would guess the .NET interface honors the same intent as the ActiveX interface, i.e.the Constant property etc. is read-only.

Confirmed.  I couldn't even compile the code when trying to change the IsContstant property.  Just a quick test though.  Didn't try anything else as a work around.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #33 on: May 06, 2010, 03:38:45 PM »
BUMMER, ok, I have to ask, can you post the LISP code?  Its been forever since I did any lisp, so I will spend more time floundering than its worth at this point.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #34 on: May 06, 2010, 03:40:06 PM »
My other question might lend itself to the discussion, How could I insert a block with attributes, use code to fill out the constant, or if its not constant, lock it from editing
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Attdisp Normal vs ON
« Reply #35 on: May 06, 2010, 03:48:44 PM »
To make an attribute constant, change dxf code 70 to 2.

(setq ent (entget (nentsel)))
(entmod (subst (cons 70 2) (assoc 70 ent) ent))

You can still change the contents with code.
(entmod (subst (cons 1 "test") (assoc 1 ent) ent))

Hope that helps.

If you want to insert a block with attributes, then you have to create all the items with dxf codes.  If you want it easier, then you can use the ActiveX way to insert, then just edit the attributes with dxf codes after.  Ron just posted a routine to create a block within a drawing, as block I mean insert.
[ http://www.theswamp.org/index.php?topic=33237.0 ]

Edit:  Add the bit code for code 70 of attributes.

70
 Attribute flags:

1 = Attribute is invisible (does not appear)

2 = This is a constant attribute

4 = Verification is required on input of this attribute

8 = Attribute is preset (no prompt during insertion)
 
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #36 on: May 06, 2010, 03:49:12 PM »
You can do it at least 2 ways Cmdr. You can entmake the attributes when you entmake the block instances, setting the constant flag in the 70 group or you can set the constant flag in the 70 group after the block instance and the attribute(s) are made. What you do not want to do is define the attribute of interest as a constant attdef in the block def. When you do that said attribute is common to all block instances of that block. Clear as mud?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #37 on: May 06, 2010, 03:53:56 PM »
To make an attribute constant, change dxf code 70 to 2 ...

Keep in mind you want to perform a bitwise or, using the existing group 70 value and 2:

(logior 2 (cdr (assoc 70 dxfdata))) ...

If you set it to 2 you could unwittingly nuke the invisible state etc.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Attdisp Normal vs ON
« Reply #38 on: May 06, 2010, 03:58:28 PM »
To make an attribute constant, change dxf code 70 to 2 ...

Keep in mind you want to perform a bitwise or, using the existing group 70 value and 2:

(logior 2 (cdr (assoc 70 dxfdata))) ...

If you set it to 2 you could unwittingly nuke the invisible state etc.

Yea.  That's why I edited my post to show the bit codes for dxf code 70.  Thanks for stating it clearer.  I forgot we are not in the lisp forum.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Attdisp Normal vs ON
« Reply #39 on: May 06, 2010, 04:09:25 PM »
I knew you knew Tim, was just making sure the audience greater was informed.

And for the audience greater, to "mask off" the constant bit do this:

(logand -3 (cdr (assoc 70 dxfdata))) ...

or this if you don't like "magic" numbers:

(logand (~ 2) (cdr (assoc 70 dxfdata))) ...

Keep in mind you do not have to revert the attribute to a non constant state to change the attribute's value (dxf group 1 | activex property 'textstring) from code, using either dxf or activex methods.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Attdisp Normal vs ON
« Reply #40 on: May 07, 2010, 09:19:05 AM »
mud, definetly mud.  I will have to get back to you on this.  At least I know I can do something, just not sure what yet.  Thanks
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)