Problem - When inserting a block on a vertical line it automatically rotates

Problem - When inserting a block on a vertical line it automatically rotates

Anonymous
Not applicable
785 Views
6 Replies
Message 1 of 7

Problem - When inserting a block on a vertical line it automatically rotates

Anonymous
Not applicable

We are currently using Autocad 2017 and use macros to insert our custom blocks.  As part of the macro the user selects the insertion point and then the rotation angle is either fixed (set by the macro) or it will ask for user input.  The macro also trims lines so we have the option to draw the line first, select a point on the line as the insertion point and the macro will trim the lines around the block.

 

We just setup a new cad station and are having issues with inserting any of our blocks that have a fixed rotation angle (0 degrees) onto a vertical line.  The block is automatically rotating 90 degrees to match the line.  I have attached a screen shot showing an example of the correct way the block should be inserted (on left) and the way it is actually coming in (on right).

 

rotation issue.PNG

 

Does anyone know what setting I need to change to fix this?  It's not a macro issue.  When you insert the block by itself without selecting a point on a line it comes in with the correct rotation.  It's only when you select a point on a vertical line that it rotates.  As well, all other cad stations are using the same macros and they're having no issues. I've fixed this once before but I cannot remember what I changed.

 

Thanks in advance,

 

0 Likes
786 Views
6 Replies
Replies (6)
Message 2 of 7

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

....  It's not a macro issue.  ....


 

I wouldn't be so sure.  If the macro knows enough to Break the Line, then it's taking information from the Line in some way, which could be affecting it.  It's impossible to say without seeing the code.

 

Do you have any running Object-Snap mode(s) on?  That's very  often the problem when things don't come out as you expect in any kind of positional sense.

Kent Cooper, AIA
Message 3 of 7

CodeDing
Advisor
Advisor

@Anonymous ,

 

I would start by checking your UNITS > Direction.. and comparing between the drawing that inserts "Correctly" and the currently "Incorrect" drawing...

UNITS

image.png

 

..Direction...

image.png

 

Best,

~DD

0 Likes
Message 4 of 7

Anonymous
Not applicable

The screenshot was taken from the same file.  We created the file on the new cad station then I opened it and inserted the block again and it came in with the correct rotation.  Just in case I checked the Units and direction on both machines and they are identical.

0 Likes
Message 5 of 7

Anonymous
Not applicable

We had this issue once before and I fixed it with a setting change.  I didn't have to adjust the macros.  I just can't remember the setting that I need to change.  When I found the solution last time it was buried in the comments of another post and it was more by luck that I found it.

0 Likes
Message 6 of 7

CodeDing
Advisor
Advisor

If your block inserts correctly Off-the-line and incorrectly on-the-line then I'm with Kent on this one.

I cannot think of a system variable or setting that, in summary, says "when inserting block(or object) on a line(or object), rotate block"

 

Not to say that it doesn't exist since I have not personally memorized the system variables, but to my current knowledge it does not.

 

If you have the ability to post all, or the insertion portion and relevant build-up events, of your code that would help others solidify whether OSNAPS are an issue or not. Once we can determine that it's not the case then other options can be explored.

 

But taking your-word-for-it by merely stating OSNAPS are not the problem, does not help others explore a solution since "We had this issue once before and I fixed it with a setting change" does not give much information to proceed forward with.

 

best,

~DD

0 Likes
Message 7 of 7

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

....  Just in case I checked the Units and direction on both machines and they are identical.


You don't say whether you also checked Osnap settings [OSMODE System Variable].

Kent Cooper, AIA
0 Likes