Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Feature set folder name

peterquRXR7S
Advocate

Feature set folder name

peterquRXR7S
Advocate
Advocate

peterquRXR7S_0-1658349506398.png

I want to activate the folder(Waterline). But I can not get its name. How do I activate it?

0 Likes
Reply
Accepted solutions (2)
504 Views
7 Replies
Replies (7)

rafael.sansao
Advisor
Advisor
Accepted solution
IF entity_exists($entity("Featureset","")) {
	ACTIVATE FOLDER ${dirname(pathname($entity("Featureset","")))}
}

Rafael Sansão

OptiNC - www.optinc.tech

EESignature

peterquRXR7S
Advocate
Advocate

Thank you. No error. But it doesn't work properly. I print it out and the path is not what I want. See the picture below.


IF entity_exists($entity("Featureset","")) {
string $p=dirname(pathname($entity("Featureset","")))
print $p
}

peterquRXR7S_0-1658432700539.png

 

0 Likes

peterquRXR7S
Advocate
Advocate

I tried this,

IF entity_exists($entity("Featureset","")) {
string $p=pathname($entity("Featureset",""))
print $p
}

and got "Featureset\FCS-24MM-DIA-M16-REG". Still not right.

0 Likes

rafael.sansao
Advisor
Advisor

The active hole feature set must be inside the folder. Looking at the image you uploaded, it is out of the folder.

Rafael Sansão

OptiNC - www.optinc.tech

EESignature

0 Likes

nguyenthinhvt95
Advocate
Advocate
Accepted solution

Hi @peterquRXR7S 

Here you go 

 

DIALOGS MESSAGE OFF
DIALOGS ERROR OFF
STRING LIST folders = get_folders('FeatureSet')
INT idx = INPUT CHOICE folders "Pick a folder"
ACTIVATE FOLDER ${folders[idx]}
DIALOGS MESSAGE ON
DIALOGS ERROR ON

peterquRXR7S
Advocate
Advocate

Yes. You were right. The feature set is out of the folder. Thank you so much!

0 Likes

peterquRXR7S
Advocate
Advocate
It is good too. Thank you so much!
0 Likes