Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems with getpoint and UCS away from origim

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
gustavobernardi
413 Views, 2 Replies

Problems with getpoint and UCS away from origim

Hi Guys, I have a problem with some lisps. I capture the point with getpoint and when designing and using the acquired point, the object is not in the right position. the problem only occurs when the UCS is away from origin. follows one of lisps: [code] (defun c:AREAFIELDMETER (/ Get-ObjectIDx64 space ss pt) (defun Get-ObjectIDx64 (obj / util) (setq util (vla-get-Utility (vla-get-activedocument (vlax-get-acad-object)))) (if (> (vl-string-search "x64" (getvar "platform")) 0) (vlax-invoke-method util "GetObjectIdString" obj :vlax-False) (itoa (vla-get-Objectid obj)) ) ) (setq space (vla-get-modelspace (vla-get-ActiveDocument (vlax-get-acad-object)) ) ) (if (and (setq ss (car (entsel "\n Select Object for Area : "))) (setq pt (getpoint "\n Specify Text Location :")) ) (vla-addMText space (vlax-3d-point pt) 1. (strcat "%<\\AcObjProp Object(%<\\_ObjId " (Get-ObjectIDx64 (vlax-ename->vla-object ss)) ">%).Area \\f \"%lu2%pr2%ps[, m²]%ct8[1]\">%" ) ) (princ) ) (princ) (c:AREAFIELDMETER) [\ code]
2 REPLIES 2
Message 2 of 3
BlackBox_
in reply to: gustavobernardi

Consider the TRANS function after you've specified the desired point(s).

Cheers


"How we think determines what we do, and what we do determines what we get."

Message 3 of 3
gustavobernardi
in reply to: BlackBox_

Solved: (setq pt (getpoint "\n Specify Text Location :")) (setq PT (trans pt 1 0)) Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost