A sliding cable structure is typically characterized by uncertainty of sliding and complexity of friction at the cable-strut joints, which makes accurate and efficient analysis difficult. In this study, we have proposed the sliding variable method, to simulate the cable sliding process considering friction equivalently and analyze the internal force and deformation response at the equilibrium state quickly and accurately. The sliding variable method takes the sliding vector of the cable at cable-strut joints as the basic variable, extracts the slippage stiffness matrix and establishes the cable force balance equation to solve the sliding vector, and simulates the change of cable original length and cable force by applying equivalent temperature load. In this paper, first, the basic principles and calculation procedures of the sliding variable method without considering friction, are discussed in detail to simulate frictionless slip of continuous cable, using with roller-type cable-stayed joints. as an example. On this basis, a calculation model incorporating the effects of friction is analyzed, a method to judge the sliding situation and balance relation of cable-forces is revealed, and the calculation principle and steps of the method are further deduced. Meanwhile, choosing a multi-joint cable–pulleys model as an example, the accuracy and rationality of the sliding variable method with and without considering friction are verified respectively. This method requires a conventional finite element calculation and second calculation alternately. Finally, to improve the practicability and computational efficiency of the sliding variable method, a macro document was compiled using the secondary development function of ANSYS parametric programming language (APDL) according to the basic framework of the sliding variable method. The frictional sliding behaviors in two typical engineering cases, a cable girder and a prestressed fish-belly girder on a foundation pit, are analyzed by using the compiled macro document in finite element program. The results show that the compiled macro document can be both accurate and efficient in calculating and analyzing cable sliding problems and can be easily popularized and applied in engineering practices.