ObjectARX

Reply
Distinguished Contributor
421232206
Posts: 162
Registered: ‎10-21-2010
Message 1 of 2 (186 Views)

bug about acedssget when the name of layer contains "#"

186 Views, 1 Replies
12-18-2012 06:50 AM

I have a dwg with a layer called "2-1#", and there are some inserts on this layer.

there are two layers on this dwg, and I just want to select inserts on layer "2-1#" ,so I tested the following code:

 

resbuf* rd = ads_buildlist(RTDXF0,_T("insert"),8,_T("2-1#"),0);
            ads_name ssName;
            acedSSGet(_T("X"),NULL,NULL,rd,ssName);
            ads_relrb(rd);rd = NULL;
            long lNumber = 0;
            ads_sslength(ssName,&lNumber);
            acutPrintf(_T("\n%d"),lNumber);
            ads_ssfree(ssName);

 execute the code ,and selected none.  but then I change the layer name to "2-1", and the code to "ads_buildlist(RTDXF0,_T("insert"),8,_T("2-1"),0);", this works.

so , i guess the problem is about char "#",  but how to solve this.  I tested my code on AutoCAD 2008.  there is a dwg attached.

Technology change world! Coding change technology! We coders are coding!
Distinguished Mentor
owenwengerd
Posts: 609
Registered: ‎08-06-2002
Message 2 of 2 (180 Views)

Re: bug about acedssget when the name of layer contains "#"

12-18-2012 08:01 AM in reply to: 421232206

You must escape wildcard characters with a reverse quote character: `#.

--
Owen Wengerd
ManuSoft

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community