Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
finding point group name
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: finding point group name (Read 1392 times)
0 Members and 1 Guest are viewing this topic.
entget
Mosquito
Posts: 19
finding point group name
«
on:
February 02, 2016, 01:03:13 PM »
i have been trying to find the Primary Point Group name(?) of an aecc_cogo_point.
...tried this: (vlax-dump-object (vlax-Ename->Vla-Object (car ent)) T)
but don't see what i'm looking for - screen capture attached hopefully
thanks
corey
Logged
Jeff_M
King Gator
Posts: 4088
C3D user & customizer
Re: finding point group name
«
Reply #1 on:
February 02, 2016, 02:45:59 PM »
With the COM API you need to go through the PointGroups, check the DrawPriority property and if the PG Contains the point. The example uses one helper function not included here...(vl-sl), which just converts an object selected by (entsel) to a vla-object.
Code - Auto/Visual Lisp:
[Select]
(
defun
getcontrollinggroupforpoint
(
aeccdb cogopt
/
grppriority highestpriority ptgrp ptnum
)
(
setq
highestPriority
-
1
ptNum
(
vlax-get
cogopt 'Number
)
)
(
vlax-for
grp
(
vlax-get
aeccdb 'pointgroups
)
(
setq
grpPriority
(
vlax-get
grp 'drawpriority
)
)
(
if
(
and
(
>
grpPriority highestPriority
)
(
=
(
vlax-invoke
grp 'ContainsPoint ptNum
)
-
1
)
)
(
progn
(
setq
ptgrp grp
highestPriority grpPriority
)
)
)
)
ptgrp
)
(
defun
c:checkgrp
(
/
c3d civdb civdoc pt grp
)
(
setq
C3D
(
strcat
"HKEY_LOCAL_MACHINE
\\
"
(
if
vlax
-
user
-
product
-
key
(
vlax
-
user
-
product
-
key
)
(
vlax-product-key
)
)
)
C3D
(
vl
-
registry
-
read
C3D
"Release"
)
C3D
(
substr
C3D
1
(
vl-string-search
"."
C3D
(
+
(
vl-string-search
"."
C3D
)
1
)
)
)
C3D
(
vla-getinterfaceobject
*
acad
*
(
strcat
"AeccXUiLand.AeccApplication."
C3D
)
)
civdoc
(
vlax-get
c3d 'activedocument
)
civdb
(
vlax-get
civdoc 'database
)
)
(
setq
pt
(
vl
-
sel
)
)
(
setq
grp
(
getcontrollinggroupforpoint civdb pt
)
)
(
princ
(
strcat
"
\n
Controlling group for selected point is "
(
vlax-get
grp 'name
)
)
)
)
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
finding point group name