Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello how are you.
Does anyone know of a function that identifies if a vector is negative?
And if it is negative, change it to positive.
I need to select a circle, get its vector and check if it is negative.
If your vector is negative, change it to positive, but leave it in the same position.
I started programming, but I couldn't identify if it is negative.
(defun c:xxx (/)
;
(setq obj (vlax-ename->vla-object (car (entsel "Select Circle"))))
(setq normal (vlax-safearray->list (vlax-variant-value (vla-get-normal obj))))
;
)
I attach a dwg showing a circle with the positive vector and another with the negative vector.
Thank you.
AutoCAD 2026.1.1
Visual Studio Code 1.105.1
AutoCAD AutoLISP Extension 1.6.3
Windows 10 - 22H2 (64 bits)
Solved! Go to Solution.