cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Rob
Graphisoft
Graphisoft

Subtype request

How could I request the lib.part subtype lets say from a called macro?
In other words I want to have a macro that could recognise the subtype of the main (calling) script like eg. sectionmarker or detailmarker etc.
The closest match I could have found in the help is REQUEST ("ANCESTRY_INFO", expr, name [,guid, parent_name1, parent_guid1,..., however I do not have an idea how to use that, the help explanation is rather perplexing (at least for me). Any thoughts fellos?
::rk
1 Reply 1
Frank Beister
Moderator
Try this inside an calling and macro object and gamble a bit. Try to label the object too.
s=-1 ! Line spacing

DIM parents[]
n = REQUEST ("ANCESTRY_INFO", 0, name, guid, parents)

IF n THEN
  TEXT2 0,0, "Replaces: " + name + " / " + guid
  ELSE
  TEXT2 0,0, "No results."
  ENDIF
TEXT2 0,s, "Parents:"
ADD2 0,s*2

IF n > 2 THEN
  FOR i = 1 to n - 2 STEP 2
    TEXT2 t,0, parents + " / " + parents[i+1]
    ADD2 0,s
    NEXT i
  ELSE
  ADD2 0,s
  ENDIF

ADD2 0,s


DIM childs[]
n = REQUEST ("ANCESTRY_INFO", 1, name, guid, childs)
IF n THEN
  TEXT2 0,0, "Replaces: " + name + " / " + guid
  ELSE
  TEXT2 0,0, "No result."
  ENDIF
TEXT2 0,s, "Childs:"
ADD2 0,s*2

IF n > 2 THEN
  FOR i = 1 to n - 2 STEP 2
    TEXT2 t,0, childs + " / " + childs[i+1]
    ADD2 0,s
    NEXT i
  ELSE
  ADD2 0,s
  ENDIF
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
... und im Übrigen bin ich der Meinung, dass Trockenbauwände einschichtig zu modellieren sind.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!