See the top rated post in this thread. Click here

Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 52

Thread: Lisp Legend

  1. #21
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Lisp Legend

    Quote Originally Posted by _brxdvs View Post
    Command: POINTTEST
    (#<VLA-OBJECT IAeccPointStyle 0000022e7346f8e0> #<VLA-OBJECT IAeccPointStyle 0000022e73453a40>)

    now if I could only find something to use in that.
    Did you have it working now?

  2. #22
    Member
    Join Date
    2017-10
    Location
    Florida
    Posts
    26
    Login to Give a bone
    0

    Default Re: Lisp Legend

    no.

    When I try to build the list using this code:
    Code:
    (defun C:pointtest ( / selPnt n index pntList pntStyle styleList)
    	(vl-load-com)	
    	(setq selPnt (ssget "X" '((0 . "AECC_COGO_POINT")))) ;selects the cogo points
    	(setq n (sslength selPnt))
    	(setq index 0)
    	(repeat n
    		(setq pntList (entget (ssname selPnt index)))
    		(setq Point (vlax-ename->vla-object (cdr (assoc -1 selPnt))))
    		(setq pntStyle (vlax-get Point 'style))
    		(setq styleList (cons pntStyle styleList)) ;build a list of point styles from the current drawing.
    		(setq index (1+ index))
    	);repeat
    	(print styleList)
    	(princ)
    );defun
    (princ)
    I get this error

    Command: POINTTEST
    ; error: bad argument type: listp <Selection set: 26>

  3. #23
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    1

    Default Re: Lisp Legend

    Quote Originally Posted by _brxdvs View Post
    Code:
    		(setq pntList (entget (ssname selPnt index)))
    		(setq Point (vlax-ename->vla-object (cdr (assoc -1 selPnt))))
    Got it?

  4. #24
    Member
    Join Date
    2017-10
    Location
    Florida
    Posts
    26
    Login to Give a bone
    0

    Default Re: Lisp Legend

    Ok I see it. got that code to build the list. Now how to figure out how to compare the point style to the block list.

    This is what autocad is giving me for the style: #<VLA-OBJECT IAeccPointStyle 000002eef48841c0>)
    is there a way to convert this to its marker name? or extract something useful form this?

  5. #25
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Lisp Legend

    Quote Originally Posted by _brxdvs View Post
    Now how to figure out how to compare the point style to the block list.
    What sort of comparison you are looking for?

    Quote Originally Posted by _brxdvs View Post
    This is what autocad is giving me for the style: #<VLA-OBJECT IAeccPointStyle 000002eef48841c0>)
    is there a way to convert this to its marker name? or extract something useful form this?
    Try the function vla-get-name or vla-get-stylename on the variable 'pntStyle' to get the name of that style but I am not sure if that point style has a property name but it does worth a try.

  6. #26
    Member
    Join Date
    2017-10
    Location
    Florida
    Posts
    26
    Login to Give a bone
    0

    Default Re: Lisp Legend

    Quote Originally Posted by Tharwat View Post
    What sort of comparison you are looking for?



    Try the function vla-get-name or vla-get-stylename on the variable 'pntStyle' to get the name of that style but I am not sure if that point style has a property name but it does worth a try.
    I tried those, no luck. Still searching for a way to get a "name" out of the pointsyles.

  7. #27
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Lisp Legend

    Please paste the following in the command line then hit enter then press F2 to see the return of the codes then paste them here.

    Code:
    (and (setq ss (ssget "X" '((0 . "AECC_COGO_POINT"))))
         (setq obj (vlax-get (vlax-ename->vla-object (ssname ss 0)) 'style))
         (vlax-dump-object obj 't)
         )

  8. #28
    Member
    Join Date
    2017-10
    Location
    Florida
    Posts
    26
    Login to Give a bone
    0

    Default Re: Lisp Legend

    Code:
    Command: (and (setq ss (ssget "X" '((0 . "AECC_COGO_POINT"))))
    (_>      (setq obj (vlax-get (vlax-ename->vla-object (ssname ss 0)) 'style))
    (_>      (vlax-dump-object obj 't)
    (_>      )
    ; IAeccPointStyle: IAeccPointStyle Interface
    ; Property values:
    ;   Application (RO) = #<VLA-OBJECT IAeccApplication 000002ef4c897b90>
    ;   CreatedBy = "rjohnson"
    ;   CustomMarkerStyle = 3
    ;   CustomMarkerSuperimposeStyle = 0
    ;   DateCreated (RO) = "9/19/2012 7:02:18 AM"
    ;   DateModified (RO) = "11/29/2016 2:47:34 PM"
    ;   Description = ""
    ;   Display3dType = 1
    ;   Document (RO) = #<VLA-OBJECT IAeccDocument 000002ef4c898460>
    ;   Elevation = 0.0
    ;   Handle (RO) = "CE1"
    ;   HasExtensionDictionary (RO) = 0
    ;   LabelDisplayStyleModel (RO) = #<VLA-OBJECT IAeccDisplayStyle 000002ef4c898d90>
    ;   LabelDisplayStylePlan (RO) = #<VLA-OBJECT IAeccDisplayStyle 000002ef4c8994e0>
    ;   MarkerDisplayStyleModel (RO) = #<VLA-OBJECT IAeccDisplayStyle 000002ef4c899540>
    ;   MarkerDisplayStylePlan (RO) = #<VLA-OBJECT IAeccDisplayStyle 000002ef4c899f00>
    ;   MarkerFixedScale = (1.0 1.0 1.0)
    ;   MarkerRotationAngle = 0.0
    ;   MarkerSize = 0.000833333
    ;   MarkerSizeType = 0
    ;   MarkerSymbolName = ""
    ;   MarkerType = 1
    ;   ModifiedBy (RO) = "bdavis"
    ;   Name = "SSMC Small"
    ;   ObjectID (RO) = 8003
    ;   ObjectName (RO) = "AeccDbPointStyle"
    ;   OrientationReference = 1
    ;   OwnerID (RO) = 8004
    ;   ScaleFactor = 1.0
    ; Methods supported:
    ;   Delete ()
    ;   ExportTo (2)
    ;   GetExtensionDictionary ()
    ;   GetXData (3)
    ;   SetXData (2)
    T
    Last edited by rkmcswain; 2018-01-19 at 01:21 PM. Reason: added [CODE] tags

  9. #29
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Lisp Legend

    Quote Originally Posted by _brxdvs View Post
    ; Name = "SSMC Small"
    Is this one of the names of Points' styles? I mean, are you after retrieving such property?

  10. #30
    Member
    Join Date
    2017-10
    Location
    Florida
    Posts
    26
    Login to Give a bone
    0

    Default Re: Lisp Legend

    yes that is one of the point styles

Page 3 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 2016-01-10, 04:44 PM
  2. Replies: 7
    Last Post: 2014-05-15, 03:00 PM
  3. Tags in Legend Views / Tag legend components
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2012-11-14, 07:08 AM
  4. Replies: 3
    Last Post: 2012-05-07, 08:16 PM
  5. Copy / Paste from Legend to Legend
    By antman in forum Revit Architecture - General
    Replies: 5
    Last Post: 2011-04-12, 03:22 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •