Archive for the ‘mmCAD’ Category

15
Mar

Today I want to present the sourcecode from the newest function in mmCAD which is called mmcad_del_layer.

void DeleteAllEntitysFromLayer()
{
    ads_name	ent;
    ads_point	pt;
        // select object
	if(acedEntSel(ACRX_T("\nObjekt wählen desen Layer gelöscht werden soll:  "), ent, pt) != RTNORM)
		return;
        // identify layername
	CString strLayername;
	if(!Intern::getLayerName(ent, strLayername))
	{
		acdbFail(_T("\nCouldn't recive Layername"));
			return;
	}

	DBG_PRINTF(_T("\nSelected Layer from Object <%s>"), strLayername);
        // build selection list
	ads_name sset = {0};
	struct resbuf* rb1 = acutBuildList(8, strLayername, RTNONE);

	if(!rb1) {
		DBG_PRINTF(
			_T("\nacutBuildList failed in <%s>"),
			__FUNCTION__);
				return;
	}
        // select whole database
	if(acedSSGet(ACRX_T("X"), NULL, NULL, rb1, sset) != RTNORM) {
		DBG_PRINTF(_T("\nacedSSGet failed in <%s>"), __FUNCTION__);
		acutRelRb(rb1);
			return;
	}

	acutRelRb(rb1);
        // delete selected objects
	acedCommand(
		RTSTR, ACRX_T("_erase"),
		RTPICKS, sset,
		RTSTR, ACRX_T(""),
		RTNONE);
} // DeleteAllEntitysFromLayer

, ,

05
Sep

Well, I like to introduce one of my projects, it’s called mmCAD. This project provides usefull commands for AutoCAD. The future goal of this project is to build up a powerfull application to assist constructing engineers by their daily work. Unfortunately the software is only available in German, because mmCAD supports only the German DIN-Standard.

Even though the project is under the GPL-License but the source code is hosted on a private server. If anybody wants to take a look at the sourcetree please write me an email. In the near future I will post some useful classes and functions from this project.

 

, , ,