If i use the mouse to pick points its like it is deducting 90 degrees out of it. still running into some issues as described in the comment :D im so close to finishing this thnx to you all! I changed stuff, i dunno really what im doing. is it possible to explain what input i need after using "insert" command? I think now i wrote the insert command wrong. Now it comes up with an error of unknown command "NA" press f1 something something. (command "Insert" "NORTHARROW" ARROW ANGT "" ) not sure how to use that command correctly (setq ANGFT (Angtos ANGF2 0 2)) converting to degrees (setq ANGF2 (* -1 ANGF1 )) attempting to reverse the angle in order to get a mirror image of the angle (setq ARROW (getpoint "\nPick arrow location")) (defun C:NA (/ REAL1 REAL2 ARROW ANGF1 ANGF2 ANGT ) any clues?Īnyways ive wrote it this way now after listening to all of you guys, If i pick one in the middle and the 2nd to the left the arrow will point south instead of to the right side. if i type an angle it works correctly. (setq bpt (getpoint "\nSpecify arrow location : ")) thats the arrow basepoint (setq ang (getangle "\nSpecify angle or click two points : ")) ok thats the angle So when you tried (* -1 angf), it returns the error you described. and also if its possible that instead of rotating the selected arrow, it will insert a block named NORTHARROW in the angle that is required. It needs to work with every angle i draw from every 2 points i choose. The lisp takes the 50 degrees info and makes it either 310 degrees or -50 degrees clockwise to north or 50 degrees counter clockwise to north. the object is rotated 50 degrees clockwise to north. it could be random stuff.Īll i need to understand really is how to turn the angle i got from these 2 points to the opposite angle.Įx 0degrees is north. The object im getting an angle from is not a block. Maybe you can post a sample drawing detailing what is original, and what it is you want at the end result. To me, it sounds like you're trying to draw a north arrow on the direction of the rotation of the original object itself. (cdr (assoc 50 (entget (car (entsel "\nSelect block: "))))) If your object is a block, you can get its rotation by selecting the block and using: is that possible without making this lisp too advanced? (i like keeping stuff simple)Īlong what axis? By putting a minus sign, you're mirroring that angle along the x axis. In order to make this lisp even greater, instead of rotating an object, i would like it to insert a block named NORTHARROW in the angle that im struggling to get. my head aches after 2 days of trying to solve this alone. My best guess for why it isnt working is because im mixing degrees with angles in my brain so i cant figure out a way to express it correctly. What i need to do then is to rotate the object i select in the same angle but in the opposite direction (it will be the mirror image of the original angle. This lisp is used to get the degrees of object based on 2 points as u can see ![]() (setq ANGT (strcat "-" ANGF )) attempting to reverse the angle in order to get a mirror image of the angle ![]() ![]() (setq ANGF2 (Angtos ANGF1 0 2)) converting to degrees (setq ANGF1 (angle REAL1 REAL2)) extracting angle - in radians (setq ARROW (getpoint "\nPick arrow basepoint")) (setq REAL2 (getpoint "\nSecond point on background")) Real angle point 2 (setq REAL1 (getpoint "\nFirst point on background")) Real angle point 1 (defun C:NA (/ REAL1 REAL2 ARROW ANGF1 ANGF2 ANGT NORTH ) Just cuz you guys are so pro maybe you will have a quick fix Sup fellas!! Im here calling for your aid again!
0 Comments
Leave a Reply. |