Author Topic: Q on Attributes and 2008  (Read 6299 times)

0 Members and 1 Guest are viewing this topic.

hendie

  • Guest
Q on Attributes and 2008
« on: March 11, 2008, 02:59:17 PM »
I have a query from a user (with 2008) who is complaining about one of my programs rotating attributes upon a block insertion
I know for a fact that our program merely inserts a block and then updates the attribute values. Nowhere do we mess with attribute rotation

Having never seen 2008, can anyone tell me if there is a switch/variable/fancy new feature that automatically rotates attributes upon a block insertion in 2008 ?

thanks

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Q on Attributes and 2008
« Reply #1 on: March 11, 2008, 03:27:13 PM »
is it a dynamic block?
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)

hendie

  • Guest
Re: Q on Attributes and 2008
« Reply #2 on: March 11, 2008, 03:37:52 PM »
nope, it's a bog standard block containing about a dozen or so attributes

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Q on Attributes and 2008
« Reply #3 on: March 11, 2008, 03:39:54 PM »
can you post it, I have 08 and I can test it for you
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: Q on Attributes and 2008
« Reply #4 on: March 11, 2008, 03:40:13 PM »
or I can PM you my email addy
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)

hendie

  • Guest
Re: Q on Attributes and 2008
« Reply #5 on: March 11, 2008, 03:49:43 PM »
I don't have the blocks here. It's a support request from one of our users ~ basically he thinks that it is our program which is rotating the attributes.
I know that there's nothing in the program code for rotating attributes, merely for populating the attribute values, and the only reason that I can think of for the attributes rotating is that Autodesk had maybe added a new feature in 2008 which rotated attributes upon insertion of the block, but there's no way for me to check since I don't have access to 2008

Even sending you the block wouldn't do any good as you would also need to download the program to use it for the block insertion

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: Q on Attributes and 2008
« Reply #6 on: March 11, 2008, 03:51:49 PM »
Is it possible that the program is doing an "ATTSYNC"?
CAD Tech

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Q on Attributes and 2008
« Reply #7 on: March 11, 2008, 03:53:13 PM »
I've seen this behavior before when the UCS is twisted and set to view....

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

hendie

  • Guest
Re: Q on Attributes and 2008
« Reply #8 on: March 11, 2008, 03:58:32 PM »
ronjonp, that is interesting.
Robdraw, I don't think it's an Attsync issue.
From what I can gather he says he inserts the blocks (using our program) and then watches the attributes (created at 90°)  rotate to 0°
I have asked the user for a copy of the offending files and will know more once I receive them

so I can assume that there's no magic "auto-rotate attributes upon insertion" variable in 2008 then ?

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Q on Attributes and 2008
« Reply #9 on: March 11, 2008, 04:03:26 PM »
None that I know of.  In Dynamic blocks, I think I set an att to always be 0 though
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)

hendie

  • Guest
Re: Q on Attributes and 2008
« Reply #10 on: March 11, 2008, 04:10:26 PM »
ah well, I'll just need to wait until I get a copy of these files then

thanks for all the help

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Q on Attributes and 2008
« Reply #11 on: March 11, 2008, 04:49:03 PM »
Hendie,

Did you try your program with the scenario I listed above?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Atook

  • Swamp Rat
  • Posts: 1030
  • AKA Tim
Re: Q on Attributes and 2008
« Reply #12 on: March 11, 2008, 04:57:14 PM »
As ronjon says, smells like a UCS issue..

Maverick®

  • Seagull
  • Posts: 14778
Re: Q on Attributes and 2008
« Reply #13 on: March 11, 2008, 05:04:14 PM »
As ronjon says, smells like a UCS issue..

Walks by.... *sniff* .... sorry, that was me.

hendie

  • Guest
Re: Q on Attributes and 2008
« Reply #14 on: March 14, 2008, 04:33:23 AM »
okay, more information came in.
The drawing is a flat 2D drawing, no additional UCS's etc.
The original blocks are all purged and audited, reporting no errors.
I have now seen the resulting drawing when these blocks are programatically (see Keith's code) placed in a new file.
The weird thing is that all of the attributes are rotated to 0°.
Further weirdness... if I copy a block and explode it the attributes then rotate to the correct rotation (some 0° and some at 90°).
Even further, immediately after inserting them, if the user does a BATTMAN > SYNC, then ALL the attributes again move to their correct rotation.
Our program works in ACAD 2000 through 2008 but it's only 2008 that is displaying this erratic behaviour.

The process is this: (We are dealing with traffic intersections)
User inserts a load of blocks (via our program), all is well, These are all 4 way intersections
The user then has the option to swap some blocks ( for roundabouts and tee junctions etc)
The block to swap is selected, then programatically we....
Get the insertion point, scale and rotation of the original block
Grab all the attributes from the original block
Delete the original block
Prompt the user to specify which direction is not present (North South East or West) ~ this then defines which of 4 blocks is inserted in place of the original
Insert the new block at the same insertion point
Set the scale and rotation as per the original block
Populate the attributes
Rename the block (because of certain functionality, each block must have a unique name)
update the block

We then end up in this situation where some attributes are incorrectly rotated

Because we can immediately do a BATTMAN > SYNC and everything is correct, it leads me to believe that it is a bug in AUtoCAD, not our software. The block definition must be correct for the block to update properly, so why is it not displaying properly when it's inserted ?