Author Topic: how to switch off info when using rotate3d  (Read 4477 times)

0 Members and 1 Guest are viewing this topic.

RAIN CODE

  • Guest
how to switch off info when using rotate3d
« on: July 05, 2012, 12:34:46 AM »

Hi all,

 I am using rotate3d to rotate the text 'Ready' before the game starts.
But this externally defined command will print out info at the text command prompt,
which i dont want it to show on screen. Is there a way to switch off ??

thanks

Ketxu

  • Newt
  • Posts: 109
Re: how to switch off info when using rotate3d
« Reply #1 on: July 05, 2012, 12:52:45 AM »
Maybe set cmdecho to 0 ?

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: how to switch off info when using rotate3d
« Reply #2 on: July 05, 2012, 01:02:49 AM »
or use functions instead of commands , like . vla-rotate3d

RAIN CODE

  • Guest
Re: how to switch off info when using rotate3d
« Reply #3 on: July 05, 2012, 01:46:08 AM »

to Ketxu - I tried cmdecho but is still print the info on command text screen

to Tharwat - eh...could you do an example how to use vla-rotate3d.  :laugh:

thanks

KewlToyZ

  • Guest
Re: how to switch off info when using rotate3d
« Reply #4 on: July 05, 2012, 01:49:48 AM »
or use functions instead of commands , like . vla-rotate3d
It would have to be using both

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: how to switch off info when using rotate3d
« Reply #5 on: July 05, 2012, 01:58:25 AM »

to Tharwat - eh...could you do an example how to use vla-rotate3d.  :laugh:

thanks

Example from Help Document

Code: [Select]
vla-Rotate3D <vla-object> <Point1> <Point2> <RotationAngle in Radians>

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: how to switch off info when using rotate3d
« Reply #6 on: July 05, 2012, 02:32:46 AM »
Just remember that using the ActiveX methods you sometimes have to convert some data types to ActiveX data types. E.g. a point list needs to be a variant safearray.:
Code - Auto/Visual Lisp: [Select]
  1. (setq eo (vlax-ename->vla-object (car (entsel)))) ;Pick an entity & convert to ActiveX object reference
  2. (setq pt1 (getpoint) pt2 (getpoint)) ;Pick the 2 points around which to ratate
  3. (vla-Rotate3d eo (vlax-3d-point pt1) (vlax-3d-point pt2) pi) ;Rotate by 180 degrees
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

pBe

  • Bull Frog
  • Posts: 402
Re: how to switch off info when using rotate3d
« Reply #7 on: July 05, 2012, 05:01:06 AM »
Code - Auto/Visual Lisp: [Select]
  1. (command "_circle" "2,2" 2)
  2. (getpropertyvalue (entlast) "radius")
  3. (setpropertyvalue (entlast) "radius" 3)

For real?

getpropertyvalue
ispropertyreadonly
setpropertyvalue


Dont have the latest version of autocad to test


irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: how to switch off info when using rotate3d
« Reply #8 on: July 05, 2012, 05:52:08 AM »
Dont have the latest version of autocad to test
It works perfectly in ACad 2012.

Here's the help on these newly introduce AutoLisp functions:
They are very powerful, I'd say even better than the vla get & set property functions. E.g. see the sample for changing properties of a vertex of a polyline in the SetPropertyValue help. And they're supposed to actually also work in Acad Mac - which doesn't allow any ActiveX.
« Last Edit: July 05, 2012, 05:55:26 AM by irneb »
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

pBe

  • Bull Frog
  • Posts: 402
Re: how to switch off info when using rotate3d
« Reply #9 on: July 05, 2012, 09:48:32 AM »
    [/list]They are very powerful, I'd say even better than the vla get & set property functions. E.g. see the sample for changing properties of a vertex of a polyline in the SetPropertyValue help. And they're supposed to actually also work in Acad Mac - which doesn't allow any ActiveX.

    So its not ActiveX? Wow, That is so cool. too bad i'm using 2009.

    .... (setpropertyvalue e3 "Vertices" 0 "EndWidth" 1.0).... amazing..  :-)

    Thank you for the info Irné




    irneb

    • Water Moccasin
    • Posts: 1794
    • ACad R9-2016, Revit Arch 6-2016
    Re: how to switch off info when using rotate3d
    « Reply #10 on: July 05, 2012, 10:40:38 AM »
    Yep they're directly defined inside ObjectARX - same as those layerstate functions. They're actually faster than using ActiveX, and you need not convert to vla-objects. As a sample I've made an in-house thing to fix up solid hatches for concrete as exported from Revit (Rvt has some issue with columns & beams having their hatches and borders on the same layer when exported):
    Code - Auto/Visual Lisp: [Select]
    1. (defun c:FixHatch (/ en L)
    2.   (while (not (setq L (tblobjname "LAYER" "STRUCT-HATCH")))
    3.     (command "_.-LAYER" "_Make" "STRUCT-HATCH" "_Color" "253" "" ""))
    4.   (setq en (entnext))
    5.   (while en
    6.     (if (eq "SOLID" (vl-catch-all-apply 'GetPropertyValue (list en "PatternName")))
    7.       (progn (SetPropertyValue en "LayerId" L)
    8.         (SetPropertyValue en "Color" "256")))
    9.     (setq en (entnext en)))
    10.   (princ))
    The only issue I have is the Dump function simply prints this to the command line. I'd think a function returning a list would be more useful - so you can actually check if a property is available.
    Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

    ElpanovEvgeniy

    • Water Moccasin
    • Posts: 1569
    • Moscow (Russia)

    RAIN CODE

    • Guest
    Re: how to switch off info when using rotate3d
    « Reply #12 on: July 11, 2012, 03:46:41 AM »
    sorry guys, forgotten to tell you that I am using autocad v2002.
    This pacman game is designed/written using v2002 autolisp.

    V2002 dont have vla-rotate3d. But v2002 have rotate3d the problem is,
    it display the info at command prompt and it sort of making the game untidy.
    I like to keep it clean and nice.

    I tried the pacman game on v2009 but the screen turn white and when
    pacman moves it creates a tunnel effect like the classic arcade game dig-dug.
    Got the same negative result when I tried Troy game by Terry Miller on v2009.

    I think grread dont work well on v2009.


    RAIN CODE

    • Guest
    Re: how to switch off info when using rotate3d
    « Reply #13 on: July 11, 2012, 03:49:57 AM »
    my old code - insert block and rotate 3d (grread)

    Thanks for the help,

    But I dunno if I could use your code.
    Do you have a more specific code doing just rotate 3d of a text ?

    thanks

    Lee Mac

    • Seagull
    • Posts: 12916
    • London, England
    Re: how to switch off info when using rotate3d
    « Reply #14 on: July 11, 2012, 05:51:07 AM »