how would I modify my code line to make the nburst take an variable "insert" as an argument? When you normally run nburst, it asks you to select something. If I already have an insert defined in the variable SPI_BlockEntity , how would I pass that to nburst instead?
The section of my code is here:
(if (= "INSERT" (cdr (assoc 0 SPI_BlockEntity))) ;check if entity is an INSERT
(progn
(c:NBURST) ;NBURST SPI_BlockEntity
) ;_ end of progn
) ;_ end of if
Firstly, note that your variable
SPI_BlockEntity does not correspond to the entity name for an
INSERT entity, but rather a static list of DXF data associated with the entity name (static in that, if the entity is modified, the list will not be updated; whereas an entity name is a pointer to the up-to-date DXF data in the drawing database). Therefore, you would need to use your
SPI_BlockEntitytName variable.
My
c:nburst function will evaluate the
ssget function to prompt the user for a selection of block references, and will then iterate over this selection, convert each entity to a vla-object, and pass the vla-object to my
LM:burstnested function for processing.
Hence, rather than attempting to make a selection of a nested entity (which is not possible), you should evaluate the
LM:burstnested function directly (effectively cutting out the
c:nburst middle-man - which is simply the user front-end for the program), supplying the required vla-object argument in the following way:
(if (= "INSERT" (cdr (assoc 0 SPI_BlockEntity))) ;check if entity is an INSERT
(progn
(LM:burstnested (vlax-ename->vla-object SPI_BlockEntitytName)) ;NBURST SPI_BlockEntity
) ;_ end of progn
) ;_ end of if